Skip to content

Commit

Permalink
fix: cross device rename
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyChen777 committed Jul 25, 2024
1 parent 16b4539 commit c145f56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/repositories/file-repository/local-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export class LocalFileBackend implements IFileBackend {
} else if (fileOperation === "copy") {
await fsPromise.copyFile(_sourceURL, _targetURL);
} else if (fileOperation === "cut") {
await fsPromise.rename(_sourceURL, _targetURL);
// await fsPromise.rename(_sourceURL, _targetURL);
await fsPromise.copyFile(_sourceURL, _targetURL);
await fsPromise.unlink(_sourceURL);
}
}
}
Expand Down

0 comments on commit c145f56

Please sign in to comment.