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 ".") -}
|
||||
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 ""
|
||||
|
|
Loading…
Reference in a new issue