populate unlocked files with newly available content when ingesting

This can happen when ingesting a new file in either locked or unlocked
mode, when some unlocked files in the repo use the same key, and the
content was not locally available before.
This commit is contained in:
Joey Hess 2015-12-22 16:22:28 -04:00
parent 4f60234690
commit cfaac52b88
Failed to extract signature
3 changed files with 27 additions and 5 deletions

View file

@ -347,7 +347,7 @@ handleAdds havelsof delayadd cs = returnWhen (null incomplete) $ do
let source = keySource $ lockedDown change
liftAnnex $ if isdirect
then finishIngestDirect key source
else Database.Keys.addAssociatedFile key (keyFilename source)
else finishIngestUnlocked key source
done change Nothing (keyFilename source) key
removedKeysMap :: Bool -> InodeComparisonType -> [Change] -> Annex (M.Map InodeCacheKey Key)