feat: safer backups

This commit is contained in:
Vasily Zubarev
2025-04-04 14:52:48 +02:00
parent 1b1d72b22d
commit 48cb9c50cb
5 changed files with 18 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ export const deleteFile = async (id: string, userId: string) => {
}
try {
await unlink(path.resolve(file.path))
await unlink(path.resolve(path.normalize(file.path)))
} catch (error) {
console.error("Error deleting file:", error)
}