You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mv() rejects a prefix-only source that it would skip #1397
mv() rejects a move with a prefix-only source that it would skip. With the keys dir/a and x in bucket (no object at dir), at d03e034:
fs.mv(["s3://bucket/dir", "s3://bucket/x"], ["s3://bucket/x", "s3://bucket/y"])
# ValueError: Cannot move a path onto another path that is moved.
dir has no object at its key, so the move would skip it and move x to y. copy() with the same pairs does that since #1344.
Cause
S3PathPairing.conflict_candidates() (s3_path_pairing.py:143) returns, for a move, only the sources that have another source below them in the pairs. Only those are looked up, so a prefix given in a list without its keys is treated as an object, and its destination x conflicts with the source x. For a copy, #1344 made every conflicting source without a version a candidate (copy=True), so the lookup finds that dir is not an object and the pair is skipped.
AioS3FileSystem._mv() pairs its paths with S3FileSystem._move_pairs() and has the same behavior.
Activity