aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/prune-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-06 09:42:45 +0100
committerChocobozzz <me@florianbigard.com>2018-12-06 09:42:45 +0100
commit3ba862daecd3429d4438f0da6c4fa04e9631c0ae (patch)
treecb1b270b2d4f5202c8d607ad2264330c21ca5cf5 /scripts/prune-storage.ts
parentd22b9b3e20c99ce2c079105673d2209aef64cec4 (diff)
downloadPeerTube-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-xscripts/prune-storage.ts5
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