fix error with errors

This commit is contained in:
Michael C
2021-08-28 01:48:48 -04:00
parent 1c2dd055c1
commit 7601a1d4bf
17 changed files with 29 additions and 29 deletions

View File

@@ -65,8 +65,10 @@ function removeOutdatedDumps(exportPath: string): Promise<void> {
// read files in export directory
fs.readdir(exportPath, async (err: any, files: string[]) => {
if (err) Logger.error(err);
if (err) return resolve();
if (err) {
Logger.error(err);
return resolve();
}
files.forEach(file => {
// we only care about files that start with "<tablename>_" and ends with .csv