fix: Default folders not being created correctly anymore

This commit is contained in:
WerWolv 2024-06-29 13:01:25 +02:00
parent ac1a28311c
commit 10970d170c

View file

@ -36,9 +36,10 @@ namespace hex::init {
// Try to create all default directories
for (auto path : paths::All) {
for (auto &folder : path->write()) {
for (auto &folder : path->all()) {
try {
wolv::io::fs::createDirectories(folder);
if (hex::fs::isPathWritable(folder.parent_path()))
wolv::io::fs::createDirectories(folder);
} catch (...) {
log::error("Failed to create folder {}!", wolv::util::toUTF8String(folder));
result = false;