summaryrefslogtreecommitdiff
path: root/Command/Fsck.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-28 22:43:51 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-28 22:43:51 -0400
commitda9cd315beb03570b96f83063a39e799fe01b166 (patch)
tree61fdc79dd54dccf1792cf3ccadcc584e0119d077 /Command/Fsck.hs
parent2b3c120506f1f25b4c3d0e19342b9826bde0b3b5 (diff)
add support for using hashDirLower in addition to hashDirMixed
Supporting multiple directory hash types will allow converting to a different one, without a flag day. gitAnnexLocation now checks which of the possible locations have a file. This means more statting of files. Several places currently use gitAnnexLocation and immediately check if the returned file exists; those need to be optimised.
Diffstat (limited to 'Command/Fsck.hs')
-rw-r--r--Command/Fsck.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 99dda99e5..a803207e2 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -87,7 +87,7 @@ verifyLocationLog key desc = do
-- Since we're checking that a key's file is present, throw
-- in a permission fixup here too.
when present $ do
- f <- fromRepo $ gitAnnexLocation key
+ f <- inRepo $ gitAnnexLocation key
liftIO $ do
preventWrite f
preventWrite (parentDir f)
@@ -118,7 +118,7 @@ verifyLocationLog key desc = do
- the key's metadata, if available. -}
checkKeySize :: Key -> Annex Bool
checkKeySize key = do
- file <- fromRepo $ gitAnnexLocation key
+ file <- inRepo $ gitAnnexLocation key
present <- liftIO $ doesFileExist file
case (present, Types.Key.keySize key) of
(_, Nothing) -> return True