diff --git a/app/repositories/file-repository/local-backend.ts b/app/repositories/file-repository/local-backend.ts index 118bd0cc..8fef745a 100644 --- a/app/repositories/file-repository/local-backend.ts +++ b/app/repositories/file-repository/local-backend.ts @@ -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); } } }