diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-20 17:23:23 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-20 17:23:23 -0400 |
commit | 2844864f91868fa9b5de18070a349bad3d92826f (patch) | |
tree | de97e7288a81a033888b77e2d474b12c9766c028 /Utility | |
parent | c7e67aa29183c7fe7bb14b909cf953a89c531b08 (diff) |
fix upFrom of "." (and upFrom of "/" on Windows)
Diffstat (limited to 'Utility')
-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 "" |