made parentDir return a Maybe FilePath; removed most uses of it
parentDir is less safe than takeDirectory, especially when working with relative FilePaths. It's really only useful in loops that want to terminate at / This commit was sponsored by Audric SCHILTKNECHT.
This commit is contained in:
parent
d09a198ec0
commit
965e106f24
47 changed files with 97 additions and 96 deletions
|
@ -70,7 +70,7 @@ withPathContents a params = seekActions $
|
|||
map a . concat <$> liftIO (mapM get params)
|
||||
where
|
||||
get p = ifM (isDirectory <$> getFileStatus p)
|
||||
( map (\f -> (f, makeRelative (parentDir p) f))
|
||||
( map (\f -> (f, makeRelative (takeDirectory p) f))
|
||||
<$> dirContentsRecursiveSkipping (".git" `isSuffixOf`) True p
|
||||
, return [(p, takeFileName p)]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue