summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-14 15:43:23 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-14 15:43:23 -0400
commitb294760833792051302df6d48c7670873da3ef76 (patch)
tree88168a774f64c543c4a1debecd0a4c442398ca82 /Git
parentea7f916c04e0b1ee022b3e4987be749db28fa2fa (diff)
more leaning toothpick fixes
Diffstat (limited to 'Git')
-rw-r--r--Git/Construct.hs4
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