From 02bc68cb6001bf6082ca5f26962a447b6943a62a Mon Sep 17 00:00:00 2001 From: Otis Gospodnetic Date: Fri, 15 Mar 2002 05:52:57 +0000 Subject: [PATCH] - Applied a fix for bug 6914. PR: Obtained from: Submitted by: Eugene Gluzberg Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149713 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/store/FSDirectory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/lucene/store/FSDirectory.java b/src/java/org/apache/lucene/store/FSDirectory.java index 3961bb2d1e9..e06a854380b 100644 --- a/src/java/org/apache/lucene/store/FSDirectory.java +++ b/src/java/org/apache/lucene/store/FSDirectory.java @@ -134,7 +134,8 @@ final public class FSDirectory extends Directory { private synchronized void create() throws IOException { if (!directory.exists()) - directory.mkdir(); + if (!directory.mkdir()) + throw new IOException("Cannot create directory: " + directory); String[] files = directory.list(); // clear old files for (int i = 0; i < files.length; i++) {