Mailing List Archive

DO NOT REPLY [Bug 6914] - 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





------- Additional Comments From otis@apache.org 2002-03-08 17:53 -------
I would actually vote against both mkdir() and mkdirs() and require that the
user/developer/application explicitly creates a directory to hold the index
outside of Lucene.
What do you think?

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
DO NOT REPLY [Bug 6914] - Problem creating directories for FSDirectory [ In reply to ]
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





------- Additional Comments From luispenya@aqs.es 2002-03-11 08:54 -------
Well, I supose that it aids to keep the problem away. But, if you want to create a new index you
shouldn't know if it exists or not, you only have to said 'I want a new index in this path' and, I
think, the writer must do all the work.

With this in mind, I think that a posible solution can
be that the indexwriter find out if the directory exists or create it.

Please comments to my
idea.

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
DO NOT REPLY [Bug 6914] - Problem creating directories for FSDirectory [ In reply to ]
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





------- Additional Comments From drag0n2@yahoo.com 2002-03-12 04:49 -------
Well, we should definatelly not keep the current code. It should either read.

if (!directory.exists())
throw new IOException("Directory " + directory + " does not exist");

OR
if (!directory.exists())
if ( !directory.mkdirs() )
throw new IOException("Cannot create directory " + directory);

I vote for #2, only because its closer to the current behaivor of the code, users that
expect at least one directory to be created for them will have to change their code...

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
DO NOT REPLY [Bug 6914] - Problem creating directories for FSDirectory [ In reply to ]
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





------- Additional Comments From luispenya@aqs.es 2002-03-12 08:14 -------
Yes, the second solution it's better, so I think.

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
DO NOT REPLY [Bug 6914] - Problem creating directories for FSDirectory [ In reply to ]
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





------- Additional Comments From drag0n2@yahoo.com 2002-03-13 04:37 -------
Created an attachment (id=1342)
its the fix for the bug

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
DO NOT REPLY [Bug 6914] - Problem creating directories for FSDirectory [ In reply to ]
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

drag0n2@yahoo.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED



------- Additional Comments From drag0n2@yahoo.com 2002-03-13 04:44 -------
Ok above is the fix, someone plz commit it. I suddenly realized I dont have commit
access!

--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>