fix: ui: create config directory before config file
Some checks failed
(CI) lsfg-vk / build (push) Has been cancelled
(CI/Flatpak) lsfg-vk / flatpak-extensions (23.08) (push) Has been cancelled
(CI/Flatpak) lsfg-vk / flatpak-extensions (24.08) (push) Has been cancelled
(CI/Flatpak) lsfg-vk / flatpak-extensions (25.08) (push) Has been cancelled
(CI/Flatpak) lsfg-vk / flatpak-ui (push) Has been cancelled

This commit is contained in:
Gary Tierney 2026-01-18 08:41:12 +00:00 committed by PancakeTAS
parent e1f89cc1da
commit 14904b9f3d
No known key found for this signature in database

View file

@ -6,6 +6,7 @@
#include "backend.hpp"
#include "utils.hpp"
#include "lsfg-vk-common/helpers/errors.hpp"
#include "lsfg-vk-common/configuration/config.hpp"
#include <chrono>
@ -71,6 +72,9 @@ Backend::Backend() {
config.profiles() = this->m_profiles;
try {
std::filesystem::create_directories(path.parent_path());
if (!std::filesystem::exists(path.parent_path()))
throw ls::error("unable to create configuration directory");
config.write(path);
} catch (const std::exception& e) {
std::cerr << "unable to write configuration:\n- " << e.what() << "\n";