fix upFrom of "." (and upFrom of "/" on Windows)
This commit is contained in:
parent
4f657aa14e
commit
27c24b7407
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ parentDir = takeDirectory . dropTrailingPathSeparator
|
||||||
- parent (ie for "/" or ".") -}
|
- parent (ie for "/" or ".") -}
|
||||||
upFrom :: FilePath -> Maybe FilePath
|
upFrom :: FilePath -> Maybe FilePath
|
||||||
upFrom dir
|
upFrom dir
|
||||||
| null dirs = Nothing
|
| length dirs < 2 = Nothing
|
||||||
| otherwise = Just $ joinDrive drive (join s $ init dirs)
|
| otherwise = Just $ joinDrive drive (join s $ init dirs)
|
||||||
where
|
where
|
||||||
-- on Unix, the drive will be "/" when the dir is absolute, otherwise ""
|
-- on Unix, the drive will be "/" when the dir is absolute, otherwise ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue