convert parentDir to be based on takeDirectory, but fixed for trailing /
This commit is contained in:
parent
3bab5dfb1d
commit
f4de021a54
4 changed files with 22 additions and 24 deletions
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue