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


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

        

Reply via email to