mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2026-04-27 04:41:45 +00:00
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
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:
parent
e1f89cc1da
commit
14904b9f3d
1 changed files with 4 additions and 0 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue