projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba862d
)
Add base dir to prune storage script
author
Chocobozzz
<me@florianbigard.com>
Thu, 6 Dec 2018 08:46:22 +0000
(09:46 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Thu, 6 Dec 2018 08:46:22 +0000
(09:46 +0100)
scripts/prune-storage.ts
patch
|
blob
|
history
diff --git
a/scripts/prune-storage.ts
b/scripts/prune-storage.ts
index f2be1b8ee98082ccd65d66b61a78db98ed53347f..c9e4dbd4b8094bead529388148c9ab0dda73a0a1 100755
(executable)
--- a/
scripts/prune-storage.ts
+++ b/
scripts/prune-storage.ts
@@
-37,7
+37,8
@@
async function run () {
toDelete = toDelete.concat(await pruneDirectory(directory, false))
}
- toDelete = toDelete.concat(await readdir(CONFIG.STORAGE.TMP_DIR))
+ const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR)
+ toDelete = toDelete.concat(tmpFiles.map(t => join(CONFIG.STORAGE.TMP_DIR, t)))
if (toDelete.length === 0) {
console.log('No files to delete.')