Add base dir to prune storage script

pull/1462/head
Chocobozzz 2018-12-06 09:46:22 +01:00
parent 3ba862daec
commit be9727bd32
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ async function run () {
toDelete = toDelete.concat(await pruneDirectory(directory, false)) toDelete = toDelete.concat(await pruneDirectory(directory, false))
} }
toDelete = toDelete.concat(await readdir(CONFIG.STORAGE.TMP_DIR)) const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR)
toDelete = toDelete.concat(tmpFiles.map(t => join(CONFIG.STORAGE.TMP_DIR, t)))
if (toDelete.length === 0) { if (toDelete.length === 0) {
console.log('No files to delete.') console.log('No files to delete.')