mirror of https://github.com/apache/lucene.git
temporary directory in isLocked(String) was never closed
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1bbe8a9361
commit
8256d94f56
|
@ -573,7 +573,10 @@ public abstract class IndexReader {
|
|||
* @throws IOException if there is a problem with accessing the index
|
||||
*/
|
||||
public static boolean isLocked(String directory) throws IOException {
|
||||
return isLocked(FSDirectory.getDirectory(directory, false));
|
||||
Directory dir = FSDirectory.getDirectory(directory, false);
|
||||
boolean result = isLocked(dir);
|
||||
dir.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue