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.
This commit is contained in:
parent
c558b39686
commit
0a998032ed
3 changed files with 14 additions and 2 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue