fix: delete backup crash if no file.

This commit is contained in:
charlesgauthereau
2026-01-11 13:36:11 +01:00
parent 2d6be20b30
commit 4ed5f9872d
3 changed files with 39 additions and 105 deletions
+2 -1
View File
@@ -75,8 +75,9 @@ export async function deleteFileS3Private(fileName: string, bucketName: string)
*/
export async function deleteLocalPrivate(fileName: string) {
try {
console.log(fileName);
const filePath = path.join(process.cwd(), privateLocalDir, fileName);
console.log(`Deleted ${filePath}`);
// Delete locally
await unlink(filePath);