git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1459646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-03-22 06:55:01 +00:00
parent be4edb9ca4
commit 3a8318ccd1
1 changed files with 3 additions and 2 deletions

View File

@ -140,8 +140,9 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
}
cacheValue.doneWithDir = true;
if (cacheValue.refCnt == 0) {
cacheValue.refCnt++; // this will go back to 0 in close
close(directory);
closeDirectory(cacheValue);
byDirectoryCache.remove(directory);
byPathCache.remove(cacheValue.path);
}
}
}