From: Chocobozzz Date: Thu, 6 Dec 2018 08:42:45 +0000 (+0100) Subject: Add tmp and redundancy directories to prune script X-Git-Tag: v1.2.0-rc.1~98 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3ba862daecd3429d4438f0da6c4fa04e9631c0ae;p=oweals%2Fpeertube.git Add tmp and redundancy directories to prune script --- diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index c0cd198f7..f2be1b8ee 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts @@ -19,7 +19,8 @@ async function run () { const storageOnlyOwnedToPrune = [ CONFIG.STORAGE.VIDEOS_DIR, - CONFIG.STORAGE.TORRENTS_DIR + CONFIG.STORAGE.TORRENTS_DIR, + CONFIG.STORAGE.REDUNDANCY_DIR ] const storageForAllToPrune = [ @@ -36,6 +37,8 @@ async function run () { toDelete = toDelete.concat(await pruneDirectory(directory, false)) } + toDelete = toDelete.concat(await readdir(CONFIG.STORAGE.TMP_DIR)) + if (toDelete.length === 0) { console.log('No files to delete.') return