From be9727bd327e8dfb15d440ba8418de7da301a74e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Dec 2018 09:46:22 +0100 Subject: [PATCH] Add base dir to prune storage script --- scripts/prune-storage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index f2be1b8ee..c9e4dbd4b 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts @@ -37,7 +37,8 @@ async function run () { 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) { console.log('No files to delete.')