Skip to content

Commit

Permalink
Platform/Qt: cleanup configuration saving for portable mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fleroviux committed Feb 18, 2024
1 parent 94060ed commit 5408aff
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/platform/qt/src/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,10 @@ struct QtConfig final : nba::PlatformConfig {
}

void Save() {
auto config_dir = fs::path(config_path).parent_path();
if (!fs::exists(config_dir)) {
try {
fs::create_directories(config_dir);
} catch (const std::exception& ex) {
qDebug() << "HHH";
}
const auto config_directory = fs::path(config_path).parent_path();

if(!config_directory.empty() && !fs::exists(config_directory)) {
fs::create_directories(config_directory);
}

nba::PlatformConfig::Save(config_path);
Expand Down

0 comments on commit 5408aff

Please sign in to comment.