fix: only unflink file if exists

master
Philipp 2025-08-25 17:50:13 +02:00
parent f1415db47c
commit e9c2a3b984
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class CsvExport {
if (!fs.existsSync(path.dirname(filePath))) {
fs.mkdirSync(path.dirname(filePath), { recursive: true });
} else {
} else if (fs.existsSync(filePath)){
fs.unlinkSync(filePath)
}
}