From 0b5f3f392124ef13cc96135448953f0a662a75ac Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 25 Feb 2025 22:53:25 +0000 Subject: [PATCH] Don't trigger delete --- frontend/sync-client/src/file-operations/file-operations.ts | 1 - .../sync-client/src/file-operations/filesystem-operations.ts | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/sync-client/src/file-operations/file-operations.ts b/frontend/sync-client/src/file-operations/file-operations.ts index 99863593..9977d60b 100644 --- a/frontend/sync-client/src/file-operations/file-operations.ts +++ b/frontend/sync-client/src/file-operations/file-operations.ts @@ -155,7 +155,6 @@ export class FileOperations { await this.fs.rename(newPath, deconflictedPath); } else { await this.database.deleteDocument(newPath); - await this.fs.delete(newPath); } } else { await this.createParentDirectories(newPath); diff --git a/frontend/sync-client/src/file-operations/filesystem-operations.ts b/frontend/sync-client/src/file-operations/filesystem-operations.ts index b58d3c23..9ea577f7 100644 --- a/frontend/sync-client/src/file-operations/filesystem-operations.ts +++ b/frontend/sync-client/src/file-operations/filesystem-operations.ts @@ -13,5 +13,7 @@ export interface FileSystemOperations { exists: (path: RelativePath) => Promise; createDirectory: (path: RelativePath) => Promise; delete: (path: RelativePath) => Promise; + + // Must be able to handle renaming to a file that already exists rename: (oldPath: RelativePath, newPath: RelativePath) => Promise; }