mirror of https://github.com/apache/lucene.git
better exception if temp directory is not readable, by Jeff Turner (bug LUCENE-449)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@312719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9d28e26666
commit
2237664f9c
|
@ -197,6 +197,8 @@ public class FSDirectory extends Directory {
|
|||
|
||||
String lockPrefix = getLockPrefix().toString(); // clear old locks
|
||||
files = lockDir.list();
|
||||
if (files == null)
|
||||
throw new IOException("Cannot read lock directory " + lockDir.getAbsolutePath());
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (!files[i].startsWith(lockPrefix))
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue