On 5/2/06, Filip Defoort <[EMAIL PROTECTED]> wrote:
Hi,

I'm running in the following problem: VFS doesn't seem to be able to
rename a file to another name when only the case is different. On windows,
since the file system is case insensitive, File.exists() returns true, which
causes FileObject.moveTo() to actually delete the source file (since it's
considered the same file as the target).... that's obviously not
desirable...

Anybody any ideas on how I can do a proper rename ? Would it be better
to have a separeate renameTo method (not moveTo) that would not delete
the target first ?

Would think that VFS could be asking what the canonical name of the
two files are, and if they equal each other then it does a no-op.
Might be of value on OS X too, not sure how its flirtation with case
insensitivity affects the JVM.

Not looked at the source before though, so just a thought.

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to