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 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
mva file onto itself.