From b92b0922d505c740ceaf46dc614a4e02aaf98ab8 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 29 Jun 2024 13:01:25 +0200 Subject: [PATCH] fix: Default folders not being created correctly anymore --- main/gui/source/init/tasks.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/gui/source/init/tasks.cpp b/main/gui/source/init/tasks.cpp index 9ca4586120092..04a9fc007bea6 100644 --- a/main/gui/source/init/tasks.cpp +++ b/main/gui/source/init/tasks.cpp @@ -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;