
bugzilla at apache
Mar 6, 2002, 5:17 AM
Post #1 of 1
(37 views)
Permalink
|
|
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 [at] jakarta ReportedBy: luispenya [at] aqs 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: <mailto:lucene-dev-unsubscribe [at] jakarta> For additional commands, e-mail: <mailto:lucene-dev-help [at] jakarta>
|