From b40419bceabfb6fec436fafcd3d4291636ec9cdd Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 11 Jun 2024 09:54:25 +0530 Subject: [PATCH 1/2] [photosd] Fix automatic move to uncategorized on watch folder deletions This was a regression introduced in 1.7.0. On deleting a file on disk, the corresponding items are supposed to move to uncategorized. > And if a file is deleted locally, then the corresponding Ente file will also > be automatically moved to uncategorized. > > https://help.ente.io/photos/features/watch-folders --- web/apps/photos/src/services/watch.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/apps/photos/src/services/watch.ts b/web/apps/photos/src/services/watch.ts index 82d3b2f4ec..42ce245fa4 100644 --- a/web/apps/photos/src/services/watch.ts +++ b/web/apps/photos/src/services/watch.ts @@ -270,10 +270,11 @@ class FolderWatcher { } const [removed, rest] = watch.syncedFiles.reduce( - ([removed, rest], { path }) => { - (event.filePaths.includes(path) ? rest : removed).push( - watch, - ); + ([removed, rest], syncedFile) => { + (event.filePaths.includes(syncedFile.path) + ? removed + : rest + ).push(syncedFile); return [removed, rest]; }, [[], []], From 92dc6cacfa917eb9571a0557c508da71033cacd3 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 11 Jun 2024 10:09:09 +0530 Subject: [PATCH 2/2] Add a CHANGELOG entry --- desktop/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop/CHANGELOG.md b/desktop/CHANGELOG.md index 1d535dc1a2..ea3843b011 100644 --- a/desktop/CHANGELOG.md +++ b/desktop/CHANGELOG.md @@ -4,6 +4,8 @@ - Remember the window size across app restarts. - Revert changes to the Linux icon. +- Fix an issue where deleted items in watched folders would not move to + uncategorized. ## v1.7.0