Skip to content

Auto-delete deletes image in library if duplicate is deleted #346

@mkirkland4874

Description

@mkirkland4874

Overview

The auto-delete feature will inadvertently delete an original photo that is in the iCloud library from the local file system if a duplicate of that image is in the Recently Deleted album.

Steps to Reproduce

  1. Add an image to the iCloud library
  2. Duplicate the image on iCloud (by using the Duplicate function on MacOS Photos or iOS device)
  3. Delete the duplicate image (i.e., move it to the Recently Deleted album)
  4. Run icloudpd with --auto-delete enabled
  5. icloudpd will delete the original image from the local filesystem even though the image still exists in the iCloud library

Expected Behavior

Auto-delete should not delete a file from the local filesystem that still exists in the iCloud library even though a duplicate of the file exists in the Recently Deleted album.

Actual Behavior

When an image exists in the iCloud library and a duplicate of the image exists in the Recently Deleted album, the auto-delete feature will delete the image in the iCloud library from the local filesystem even though it still exists in the library.

Context

Other issues in the repo have documented that iCloud allows duplicate images to exist in the iCloud library even though they have the same filename. This bug in the auto-delete function seems to be a consequence of that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions