abashev / vfs-s3

Amazon S3 driver for Apache commons-vfs (Virtual File System) project
Apache License 2.0
92 stars 50 forks source link

Rename/Move makes a copy but doesn't delete the original. #15

Closed svella closed 5 years ago

svella commented 11 years ago

S3FileObject.doRename() calls copyObject but doesn't bother deleting the original.

svella commented 11 years ago

On second thought, given that S3 doesn't actually support rename, the right solution is to not implement doRename() but rather override canRenameTo() to always return false. Then the default moveTo will do copyFrom and deleteSelf().

Note that moveTo still won't work correctly for folders because of https://issues.apache.org/jira/browse/VFS-481

svella commented 11 years ago

16 Pull request addresses this