Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
c74cd9fe
Verified
Commit
c74cd9fe
authored
May 03, 2022
by
Chocobozzz
Browse files
Fix removing directory content
parent
21d70a73
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/initializers/installer.ts
View file @
c74cd9fe
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
)
)
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment