fix: only unflink file if exists
parent
f1415db47c
commit
e9c2a3b984
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue