Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(backend:files): skip adding recents for trashed files

johavenc445196914b2
diff --git a/backend/src/applications/files/services/files-recents.service.ts b/backend/src/applications/files/services/files-recents.service.ts
index 3b376b11..fd7e5837 100644
--- a/backend/src/applications/files/services/files-recents.service.ts
+++ b/backend/src/applications/files/services/files-recents.service.ts
@@ -32,6 +32,10 @@ export class FilesRecents {
}
async updateRecents(user: UserModel, space: SpaceEnv, files: FileProps[]): Promise<void> {
+ if (space.inTrashRepository) {
+ // Ignore trashed files
+ return
+ }
const timestamp = currentTimeStamp(null, true) - convertHumanTimeToMs(this.keepTime)
const location = this.getLocation(user, space, files)
// only store files, ignore dirs