Verified Commit c74cd9fe authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix removing directory content

parent 21d70a73
import { ensureDir, readdir, remove } from 'fs-extra'
import passwordGenerator from 'password-generator'
import { join } from 'path'
import { UserRole } from '@shared/models'
import { logger } from '../helpers/logger'
import { buildUser, createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user'
......@@ -67,7 +68,7 @@ async function removeDirectoryOrContent (dir: string) {
const files = await readdir(dir)
for (const file of files) {
await remove(file)
await remove(join(dir, file))
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment