diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Construct.hs | 4 | ||||
-rw-r--r-- | Git/Repair.hs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs index 108ee7eb7..0b926342f 100644 --- a/Git/Construct.hs +++ b/Git/Construct.hs @@ -46,8 +46,8 @@ fromCwd = getCurrentDirectory >>= seekUp r <- checkForRepo dir case r of Nothing -> case parentDir dir of - "" -> return Nothing - d -> seekUp d + Nothing -> return Nothing + Just d -> seekUp d Just loc -> Just <$> newFrom loc {- Local Repo constructor, accepts a relative or absolute path. -} diff --git a/Git/Repair.hs b/Git/Repair.hs index bee9f2b50..2930b9a0c 100644 --- a/Git/Repair.hs +++ b/Git/Repair.hs @@ -244,7 +244,7 @@ explodePackedRefsFile r = do where makeref (sha, ref) = do let dest = localGitDir r </> fromRef ref - createDirectoryIfMissing True (parentDir dest) + createDirectoryIfMissing True (takeDirectory dest) unlessM (doesFileExist dest) $ writeFile dest (fromRef sha) |