Sitelet https://github.com/aws/aws-cli/issues/831
Skip to content

Should not be able to mv a remote file onto itself #831

Description

@jamesls

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.s3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions