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; }