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:
Daniel Naber 2005-10-10 19:33:22 +00:00
parent 9d28e26666
commit 2237664f9c
1 changed files with 2 additions and 0 deletions

View File

@ -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;