fix: ui: create config directory before config file

This commit is contained in:
Gary Tierney 2026-01-18 08:41:12 +00:00
parent e1f89cc1da
commit bbf33c409f

View file

@ -71,6 +71,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";