Add tmp and redundancy directories to prune script

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

View File

@ -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