summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-06-11 15:14:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-06-11 15:15:05 -0400
commit0d30987f8780d51ea144f2fca9f6482b15c2b71d (patch)
treec58e9cd90566be449711eeaf76afca3fd9b4d022 /Annex
parent40b52623536beb978d3bcc941b8a87a12010cbac (diff)
Fix bug that prevented enumerating locally present objects in repos tuned with annex.tune.objecthash1=true
Need to walk 1 level of subdirs less in this case. The git-annex branch traversal code didn't have a similar bug.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Content.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 5e7dd322b..397eb4061 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -521,11 +521,12 @@ getKeysPresent keyloc = do
direct <- isDirect
dir <- fromRepo gitAnnexObjectDir
s <- getstate direct
- liftIO $ walk s direct (2 :: Int) dir
+ depth <- gitAnnexLocationDepth <$> Annex.getGitConfig
+ liftIO $ walk s direct depth dir
where
walk s direct depth dir = do
contents <- catchDefaultIO [] (dirContents dir)
- if depth == 0
+ if depth < 2
then do
contents' <- filterM (present s direct) contents
let keys = mapMaybe (fileKey . takeFileName) contents'