[ https://issues.apache.org/jira/browse/VFS-347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114595#comment-13114595 ]
P-Y Fourmond commented on VFS-347: ---------------------------------- Ok, FileSystem do not implement equals method, but maybe they should ! At least FileSystem should implement a method to know if two FileSystems are on the same physical one. Sorry but I don't have any test case. > AbstractFileObject canRenameTo method is incorrect > -------------------------------------------------- > > Key: VFS-347 > URL: https://issues.apache.org/jira/browse/VFS-347 > Project: Commons VFS > Issue Type: Bug > Affects Versions: 1.0 > Reporter: P-Y Fourmond > Labels: AbstractFileObject, FileObject, FileSystem, canRenameTo, > moveTo > > AbstractFileObject is written like this: > public boolean canRenameTo(FileObject newfile) > { > if (getFileSystem() == newfile.getFileSystem()) > { > return true; > } > return false; > } > So when you move a File inside the same filesystem, Apache VFS thinks it is > on another filesystem. > Thus, the file is copied instead of being moved. > getFileSystem().equals(newFile.getFileSystem()) should be used instead. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira