ObjectDirectory: fix closing of obsolete packs

This resolves a regression introduced in fef78212.

Change-Id: Ibb4521635a87012520566efc70870c59d11be874
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
This commit is contained in:
Marc Strapetz 2019-05-22 23:51:12 +02:00 committed by Matthias Sohn
parent 91101414ae
commit f1577909e7
1 changed files with 2 additions and 1 deletions

View File

@ -911,9 +911,10 @@ private PackList scanPacksImpl(PackList old) {
final String packName = base + PACK.getExtension();
final File packFile = new File(packDirectory, packName);
final PackFile oldPack = forReuse.remove(packName);
final PackFile oldPack = forReuse.get(packName);
if (oldPack != null
&& !oldPack.getFileSnapshot().isModified(packFile)) {
forReuse.remove(packName);
list.add(oldPack);
continue;
}