Don't delete .keep

This commit is contained in:
loicbersier 2020-08-30 22:20:11 +02:00
parent 7eb866cfe4
commit af93b014f7

View file

@ -254,6 +254,7 @@ async function generateThumbnail(f) {
.on('end', () => {
// Save space by deleting tmp directory
for (let files of fs.readdirSync(`./public/thumbnail/tmp/${f}`)) {
if (files == '.keep') return;
fs.unlinkSync(`./public/thumbnail/tmp/${f}/${files}`);
}
fs.rmdirSync(`./public/thumbnail/tmp/${f}`);