diff options
-rw-r--r-- | Utility/Path.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs index c42a70601..b9dbd92a9 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -85,7 +85,7 @@ parentDir = takeDirectory . dropTrailingPathSeparator - parent (ie for "/" or ".") -} upFrom :: FilePath -> Maybe FilePath upFrom dir - | null dirs = Nothing + | length dirs < 2 = Nothing | otherwise = Just $ joinDrive drive (join s $ init dirs) where -- on Unix, the drive will be "/" when the dir is absolute, otherwise "" |