add name-id7-versioned file match policy #1250
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The existing
name-id7file-match policy appends truncated iCloud asset ID to base filenames, but not toadjustedoralternativeversions.When multiple edited versions share the same original basename and are downloaded into the same folder, their filenames collide and only the first one is saved. Subsequent ones are skipped.
IMG_1234.JPGQVpTNGNIMG_1234-adjusted.JPGIMG_1234.JPGQXpUOGxIMG_1234-adjusted.JPGSo, because the ID isn’t carried into the adjusted/alternative filenames, different assets can produce the same adjusted filename.
Proposal
Introduce a new policy,
name-id7-versioned, which behaves likename-id7but also carries the truncated asset ID intoadjustedandalternativeversions.IMG_1234.JPGQVpTNGNIMG_1234_QVpTNGN-adjusted.JPGIMG_1234.JPGQXpUOGxIMG_1234_QXpUOGx-adjusted.JPGThis new behavior can be selected with
--file-match-policy name-id7-versioned.Benefits
Backward compatibility
name-size-dedup-with-suffix,name-id7) continue to work as before.