Skip to content

Commit 6e91533

Browse files
garyttierneyPancakeTAS
authored andcommitted
fix: ui: create config directory before config file
1 parent e1f89cc commit 6e91533

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lsfg-vk-ui/src/backend.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ Backend::Backend() {
7171
config.profiles() = this->m_profiles;
7272

7373
try {
74+
std::filesystem::create_directories(path.parent_path());
75+
if (!std::filesystem::exists(path.parent_path()))
76+
throw ls::error("unable to create configuration directory");
7477
config.write(path);
7578
} catch (const std::exception& e) {
7679
std::cerr << "unable to write configuration:\n- " << e.what() << "\n";

0 commit comments

Comments
 (0)