Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@apache.org Received: (qmail 57140 invoked from network); 6 Mar 2002 12:17:59 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Mar 2002 12:17:59 -0000 Received: (qmail 11739 invoked by uid 97); 6 Mar 2002 12:17:57 -0000 Delivered-To: qmlist-jakarta-archive-lucene-dev@jakarta.apache.org Received: (qmail 11691 invoked by uid 97); 6 Mar 2002 12:17:56 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 11677 invoked by uid 50); 6 Mar 2002 12:17:55 -0000 Date: 6 Mar 2002 12:17:55 -0000 Message-ID: <20020306121755.11676.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: lucene-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 6914] New: - Problem creating directories for FSDirectory X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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: For additional commands, e-mail: