diff options
author | 2013-05-14 15:43:47 -0500 | |
---|---|---|
committer | 2013-05-14 15:43:47 -0500 | |
commit | 06fd8f1ff99f15cf8830cf06b265e8c2b0c84e18 (patch) | |
tree | 3c36fe8382734303cb2f53e5c0c72d3296328a98 /Git/Construct.hs | |
parent | 61d4c17093ecb360e877a4250cfabeb38b30a458 (diff) | |
parent | b294760833792051302df6d48c7670873da3ef76 (diff) |
Merge remote-tracking branch 'gnu/windows' into windows
Diffstat (limited to 'Git/Construct.hs')
-rw-r--r-- | Git/Construct.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs index a30071585..1cded7a13 100644 --- a/Git/Construct.hs +++ b/Git/Construct.hs @@ -58,7 +58,7 @@ fromPath dir = fromAbsPath =<< absPath dir - specified. -} fromAbsPath :: FilePath -> IO Repo fromAbsPath dir - | "/" `isPrefixOf` dir = + | isAbsolute dir = ifM (doesDirectoryExist dir') ( ret dir' , hunt ) | otherwise = error $ "internal error, " ++ dir ++ " is not absolute" @@ -71,7 +71,7 @@ fromAbsPath dir {- When dir == "foo/.git", git looks for "foo/.git/.git", - and failing that, uses "foo" as the repository. -} hunt - | "/.git" `isSuffixOf` canondir = + | pathSeparator:".git" `isSuffixOf` canondir = ifM (doesDirectoryExist $ dir </> ".git") ( ret dir , ret $ takeDirectory canondir |