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
fix(googlephotos): properly transition discovered assets to discarded state
Assets discovered during Google Photos takeout processing were being left
in PENDING state when they should have been transitioned to DISCARDED.
Two scenarios were affected:
1. Duplicate files in the same directory: When a file with the same base
name was found in a directory, RecordAssetDiscardedImmediately was
being called. However, the asset was already discovered and in PENDING
state, so RecordAssetDiscarded should be used instead to properly
transition it.
2. Files without JSON metadata: When --include-unmatched is false, files
without matching JSON metadata were not being transitioned to DISCARDED
state, leaving them stuck in PENDING.
This resulted in assets being reported as "pending" at the end of upload,
even though they were correctly identified as duplicates or filtered.
toc.processor.RecordAssetDiscardedImmediately(ctx, fshelper.FSName(w, name), finfo.Size(), fileevent.DiscardedLocalDuplicate, "duplicated in the directory")
232
+
// Asset was already discovered above, so transition from pending to discarded
233
+
toc.processor.RecordAssetDiscarded(ctx, fshelper.FSName(w, name), finfo.Size(), fileevent.DiscardedLocalDuplicate, "duplicated in the directory")
0 commit comments