1
0
mirror of synced 2024-11-28 01:20:51 +01:00

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 // Try to create all default directories
for (auto path : paths::All) { for (auto path : paths::All) {
for (auto &folder : path->write()) { for (auto &folder : path->all()) {
try { try {
wolv::io::fs::createDirectories(folder); if (hex::fs::isPathWritable(folder.parent_path()))
wolv::io::fs::createDirectories(folder);
} catch (...) { } catch (...) {
log::error("Failed to create folder {}!", wolv::util::toUTF8String(folder)); log::error("Failed to create folder {}!", wolv::util::toUTF8String(folder));
result = false; result = false;