diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-09 14:26:52 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-09 14:26:52 -0400 |
commit | 07e849757ea41979914cb31ea43d21caef1d8957 (patch) | |
tree | ddfa1157029cfbbe3868485e3aa325e5158c9626 /Git | |
parent | 425bc1107aebdb701cdcee44da731dd918cd470d (diff) |
convert parentDir to be based on takeDirectory, but fixed for trailing /
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Construct.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs index 108ee7eb7..572c5eb37 100644 --- a/Git/Construct.hs +++ b/Git/Construct.hs @@ -45,9 +45,9 @@ fromCwd = getCurrentDirectory >>= seekUp seekUp dir = do r <- checkForRepo dir case r of - Nothing -> case parentDir dir of - "" -> return Nothing - d -> seekUp d + Nothing -> case upFrom dir of + Nothing -> return Nothing + Just d -> seekUp d Just loc -> Just <$> newFrom loc {- Local Repo constructor, accepts a relative or absolute path. -} |