Fix promise on folder removal for last timelapse frame of date folder

cron-as-worker-process
Moe 2022-06-27 16:29:02 -07:00
parent 8c9262a9f2
commit 5fea41d053
1 changed files with 1 additions and 1 deletions

View File

@ -423,7 +423,7 @@ const deleteOldTimelapseFrames = async function(v){
const folderPath = foldersDeletedFrom[i];
const folderIsEmpty = (await fs.promises.readdir(folderPath)).filter(file => file.indexOf('.jpg') > -1).length === 0;
if(folderIsEmpty){
await fs.rmdir(folderPath, { recursive: true })
await fs.promises.rmdir(folderPath, { recursive: true })
}
}
const deleteResponse = await knexQueryPromise({