add System.FilePath to this conversion
It seems to make sense to convert both System.Directory and System.FilePath uses to OsPath in one go. This will generally look like replacing RawFilePath with OsPath in type signatures, and will be driven by the now absolutely massive pile of compile errors. Got a few modules building in this new regime. Sponsored-by: Jack Hill
This commit is contained in:
parent
05bdce328d
commit
c3c8870752
6 changed files with 53 additions and 46 deletions
|
@ -64,11 +64,11 @@ fromPath dir
|
|||
-- When dir == "foo/.git", git looks for "foo/.git/.git",
|
||||
-- and failing that, uses "foo" as the repository.
|
||||
| (P.pathSeparator `B.cons` ".git") `B.isSuffixOf` canondir =
|
||||
ifM (doesDirectoryExist $ fromRawFilePath dir </> ".git")
|
||||
ifM (doesDirectoryExist $ fromOsPath dir </> ".git")
|
||||
( ret dir
|
||||
, ret (P.takeDirectory canondir)
|
||||
)
|
||||
| otherwise = ifM (doesDirectoryExist (fromRawFilePath dir))
|
||||
| otherwise = ifM (doesDirectoryExist (fromOsPath dir))
|
||||
( checkGitDirFile dir >>= maybe (ret dir) (pure . newFrom)
|
||||
-- git falls back to dir.git when dir doesn't
|
||||
-- exist, as long as dir didn't end with a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue