diff options
-rw-r--r-- | server/initializers/installer.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index c18998244..0364bdbe5 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { ensureDir, readdir, remove } from 'fs-extra' | 1 | import { ensureDir, readdir, remove } from 'fs-extra' |
2 | import passwordGenerator from 'password-generator' | 2 | import passwordGenerator from 'password-generator' |
3 | import { join } from 'path' | ||
3 | import { UserRole } from '@shared/models' | 4 | import { UserRole } from '@shared/models' |
4 | import { logger } from '../helpers/logger' | 5 | import { logger } from '../helpers/logger' |
5 | import { buildUser, createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user' | 6 | import { buildUser, createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user' |
@@ -67,7 +68,7 @@ async function removeDirectoryOrContent (dir: string) { | |||
67 | const files = await readdir(dir) | 68 | const files = await readdir(dir) |
68 | 69 | ||
69 | for (const file of files) { | 70 | for (const file of files) { |
70 | await remove(file) | 71 | await remove(join(dir, file)) |
71 | } | 72 | } |
72 | } | 73 | } |
73 | } | 74 | } |