You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2002/03/06 13:17:55 UTC
DO NOT REPLY [Bug 6914] New: -
Problem creating directories for FSDirectory
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6914>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6914
Problem creating directories for FSDirectory
Summary: Problem creating directories for FSDirectory
Product: Lucene
Version: CVS Nightly - Specify date in submission
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Store
AssignedTo: lucene-dev@jakarta.apache.org
ReportedBy: luispenya@aqs.es
There is a problem when you try to create a directory (FSDirectory) that doesn't exists and you
specified a path with a depth greater than 1.
For example: lucia/index/
The problem
lays on the method
private synchronized void create() throws IOException {
if
(!directory.exists())
directory.mkdir(); <======== HERE SHOULD BE mkdirs();
String[] files = directory.list(); // clear old files
for (int i = 0; i < files.length; i++) {
File file = new File(directory, files[i]);
if (!file.delete())
throw new
IOException("couldn't delete " + files[i]);
}
}
Regerds
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>