Fix promise on folder removal for last timelapse frame of date folder
parent
8c9262a9f2
commit
5fea41d053
2
cron.js
2
cron.js
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue