lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From petite_abeille <>
Subject Re: FSDirectory patch for file renaming
Date Tue, 18 Feb 2003 22:12:41 GMT

On Tuesday, Feb 18, 2003, at 22:59 Europe/Zurich, Matt Tucker wrote:

> I believe that's the current logic used by FSDirectory, and it still
> breaks.

I see... deleting an non-existent file before a rename usually does the 
trick under the different Windows flavors...

If the destination file exists in the first place... have you tried to 
simply recreate the File object after the first delete if the file did 
exists? Something like:

// aDestinationFile exists in this case... get ride of it...


// FIXME: Hack to flush something, somewhere in the vm... sigh...

aDestinationFile = null;
aDestinationFile = new File( aPath );

// Finally do the rename...

aSourceFile.renameTo( aDestinationFile );


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message