1
0
Fork 0

Fix removing directory content

This commit is contained in:
Chocobozzz 2022-05-03 08:23:59 +02:00
parent 21d70a7302
commit c74cd9feab
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
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))
}
}
}