-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should not be able to mv a remote file onto itself #831
Comments
jamesls
added a commit
to jamesls/aws-cli
that referenced
this issue
Jun 30, 2014
jamesls
added a commit
that referenced
this issue
Jul 7, 2014
This is not in the 1.3.21 release, it will be part of the next release.
jamesls
added a commit
that referenced
this issue
Jul 10, 2014
* release-1.3.22: Bumping version to 1.3.22 Update CHANGELOG with the latest features Update completer test with new services Update changelog with #825 Add changelog entry for #834 Fix changelog entry for merge of #831 Added test_cancel_after_upload_id to test_tasks Update changelog with fix for #549 Disable fix_s3_host when --endpoint-url is given Fixes issue #834 Update changelog with bugfix Add validation to ensure we don't mv a file onto itself Let aws.cmd find python.exe on paths with spaces.
@jamesls , are you sure you fixed it? I've just run into this problem and ended up loosing a few hundred files. CLI command:
Output for one of the files:
CLI version: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current s3 mv command is essentially a
cp(src, dst) && rm(src)
. Normally, if you aren't changing the object's metadata, storage class, website config, or encryption attrs you can't copy and object onto itself. However, a multipart copy of an object onto itself will work, which happens if the object is over our multipart threshold size, which means that we will also delete the src file which is not what we want.So we should be adding validation to ensure that we aren't trying to
mv
a file onto itself.The text was updated successfully, but these errors were encountered: