aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/prune-storage.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts
index bc59da6af..572283868 100755
--- a/scripts/prune-storage.ts
+++ b/scripts/prune-storage.ts
@@ -1,9 +1,9 @@
1import * as prompt from 'prompt' 1import * as prompt from 'prompt'
2import { join } from 'path' 2import { join } from 'path'
3import { readdirPromise, unlinkPromise } from '../server/helpers/core-utils'
4import { CONFIG } from '../server/initializers/constants' 3import { CONFIG } from '../server/initializers/constants'
5import { VideoModel } from '../server/models/video/video' 4import { VideoModel } from '../server/models/video/video'
6import { initDatabaseModels } from '../server/initializers' 5import { initDatabaseModels } from '../server/initializers'
6import { remove, readdir } from 'fs-extra'
7 7
8run() 8run()
9 .then(() => process.exit(0)) 9 .then(() => process.exit(0))
@@ -39,7 +39,7 @@ async function run () {
39 console.log('Processing delete...\n') 39 console.log('Processing delete...\n')
40 40
41 for (const path of toDelete) { 41 for (const path of toDelete) {
42 await unlinkPromise(path) 42 await remove(path)
43 } 43 }
44 44
45 console.log('Done!') 45 console.log('Done!')
@@ -49,7 +49,7 @@ async function run () {
49} 49}
50 50
51async function pruneDirectory (directory: string) { 51async function pruneDirectory (directory: string) {
52 const files = await readdirPromise(directory) 52 const files = await readdir(directory)
53 53
54 const toDelete: string[] = [] 54 const toDelete: string[] = []
55 for (const file of files) { 55 for (const file of files) {