diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-06 09:46:22 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-06 09:46:22 +0100 |
commit | be9727bd327e8dfb15d440ba8418de7da301a74e (patch) | |
tree | f8831b23134ba5aa8b4b1378ec7acaba426e08ac /scripts | |
parent | 3ba862daecd3429d4438f0da6c4fa04e9631c0ae (diff) | |
download | PeerTube-be9727bd327e8dfb15d440ba8418de7da301a74e.tar.gz PeerTube-be9727bd327e8dfb15d440ba8418de7da301a74e.tar.zst PeerTube-be9727bd327e8dfb15d440ba8418de7da301a74e.zip |
Add base dir to prune storage script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/prune-storage.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 () { | |||
37 | toDelete = toDelete.concat(await pruneDirectory(directory, false)) | 37 | toDelete = toDelete.concat(await pruneDirectory(directory, false)) |
38 | } | 38 | } |
39 | 39 | ||
40 | toDelete = toDelete.concat(await readdir(CONFIG.STORAGE.TMP_DIR)) | 40 | const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR) |
41 | toDelete = toDelete.concat(tmpFiles.map(t => join(CONFIG.STORAGE.TMP_DIR, t))) | ||
41 | 42 | ||
42 | if (toDelete.length === 0) { | 43 | if (toDelete.length === 0) { |
43 | console.log('No files to delete.') | 44 | console.log('No files to delete.') |