Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[web] Prevent dedup from failing because of shared files owned by others

Manav Rathife19868623e0
diff --git a/web/packages/new/photos/services/dedup.ts b/web/packages/new/photos/services/dedup.ts
index 0efeb21e5d..fe57f3d063 100644
--- a/web/packages/new/photos/services/dedup.ts
+++ b/web/packages/new/photos/services/dedup.ts
@@ -130,6 +130,10 @@ export const deduceDuplicates = async () => {
const collectionIDsByFileID = new Map<number, Set<number>>();
const filesByHash = new Map<string, EnteFile[]>();
for (const file of filteredCollectionFiles) {
+ // User cannot delete files that are not owned by the user even if they
+ // are in an album owned by the user.
+ if (file.ownerID != userID) continue;
+
const hash = metadataHash(file.metadata);
if (!hash) {
// Some very old files uploaded by ancient versions of Ente might