Skip to content

armgit / ente

Public Imported from GitHub
0

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

Clear stale watch folder sync entries even if trashing fails

Anand Baburajana9f8fc39afc7
diff --git a/web/CLAUDE.md b/web/CLAUDE.md
index ae20cb97eb..2e863fcfc1 100644
--- a/web/CLAUDE.md
+++ b/web/CLAUDE.md
@@ -8,6 +8,7 @@ When making commits, follow these rules:
- Subject line under 72 chars as a single sentence (no body text, no bullets, no lists)
- NO emojis
- NO promotional text or links
+- NO Co-Authored-By lines
- ONLY run pre-commit checks (format, lint, typecheck, build) when explicitly creating a commit
Example:
diff --git a/web/apps/photos/src/services/watch.ts b/web/apps/photos/src/services/watch.ts
index 5d609ef525..bbf200e978 100644
--- a/web/apps/photos/src/services/watch.ts
+++ b/web/apps/photos/src/services/watch.ts
@@ -369,8 +369,17 @@ class FolderWatcher {
this.activeWatch = watch;
- await this.moveToTrash(removed);
+ try {
+ await this.moveToTrash(removed);
+ } catch (e) {
+ log.error(
+ "Failed to trash files from watch folder, clearing stale sync entries",
+ e,
+ );
+ }
+ // Always update syncedFiles to remove stale entries, even if
+ // trashing failed. Otherwise we'll keep retrying forever.
await ensureElectron().watch.updateSyncedFiles(
rest,
watch.folderPath,