Skip to content

Conversation

@e1y4s
Copy link

@e1y4s e1y4s commented Sep 13, 2025

The existing name-id7 file-match policy appends truncated iCloud asset ID to base filenames, but not to adjusted or alternative versions.

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.

Step Original filename Asset ID Resulting filename (adjusted) Status
1 IMG_1234.JPG QVpTNGN IMG_1234-adjusted.JPG ✅ downloaded
2 IMG_1234.JPG QXpUOGx IMG_1234-adjusted.JPG ❌ skipped (already exists)

So, 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 like name-id7 but also carries the truncated asset ID into adjusted and alternative versions.

Step Original filename Asset ID Resulting filename (adjusted) Status
1 IMG_1234.JPG QVpTNGN IMG_1234_QVpTNGN-adjusted.JPG ✅ downloaded
2 IMG_1234.JPG QXpUOGx IMG_1234_QXpUOGx-adjusted.JPG ✅ downloaded

Likewise for alternative.

This new behavior can be selected with --file-match-policy name-id7-versioned.

Benefits

  • Prevents filename collisions for edited versions.
  • Preserves a clear mapping between originals and their edited versions.
  • Safer for syncing/backup pipelines that rely on unique filenames.

Backward compatibility

  • Default behavior is unchanged.
  • Existing policies (name-size-dedup-with-suffix, name-id7) continue to work as before.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants