diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-06 09:42:45 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-06 09:42:45 +0100 |
commit | 3ba862daecd3429d4438f0da6c4fa04e9631c0ae (patch) | |
tree | cb1b270b2d4f5202c8d607ad2264330c21ca5cf5 /scripts/prune-storage.ts | |
parent | d22b9b3e20c99ce2c079105673d2209aef64cec4 (diff) | |
download | PeerTube-3ba862daecd3429d4438f0da6c4fa04e9631c0ae.tar.gz PeerTube-3ba862daecd3429d4438f0da6c4fa04e9631c0ae.tar.zst PeerTube-3ba862daecd3429d4438f0da6c4fa04e9631c0ae.zip |
Add tmp and redundancy directories to prune script
Diffstat (limited to 'scripts/prune-storage.ts')
-rwxr-xr-x | scripts/prune-storage.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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 () { | |||
19 | 19 | ||
20 | const storageOnlyOwnedToPrune = [ | 20 | const storageOnlyOwnedToPrune = [ |
21 | CONFIG.STORAGE.VIDEOS_DIR, | 21 | CONFIG.STORAGE.VIDEOS_DIR, |
22 | CONFIG.STORAGE.TORRENTS_DIR | 22 | CONFIG.STORAGE.TORRENTS_DIR, |
23 | CONFIG.STORAGE.REDUNDANCY_DIR | ||
23 | ] | 24 | ] |
24 | 25 | ||
25 | const storageForAllToPrune = [ | 26 | const storageForAllToPrune = [ |
@@ -36,6 +37,8 @@ async function run () { | |||
36 | toDelete = toDelete.concat(await pruneDirectory(directory, false)) | 37 | toDelete = toDelete.concat(await pruneDirectory(directory, false)) |
37 | } | 38 | } |
38 | 39 | ||
40 | toDelete = toDelete.concat(await readdir(CONFIG.STORAGE.TMP_DIR)) | ||
41 | |||
39 | if (toDelete.length === 0) { | 42 | if (toDelete.length === 0) { |
40 | console.log('No files to delete.') | 43 | console.log('No files to delete.') |
41 | return | 44 | return |