[nostalgia/studio] Fix config dir creation not create duplicate dirs
This commit is contained in:
parent
839a791ddd
commit
9b36381b00
@ -73,7 +73,7 @@ ox::Error writeConfig(core::Context *ctx, const auto &name, T *data) noexcept {
|
||||
const auto configPath = ox::sfmt(ConfigDir, homeDir, ctx->appName).toStdString();
|
||||
const auto path = ox::sfmt("{}.json", name).toStdString();
|
||||
ox::PassThroughFS fs(configPath.c_str());
|
||||
if (auto err = fs.mkdir(configPath.c_str(), true)) {
|
||||
if (auto err = fs.mkdir("/", true)) {
|
||||
oxErrf("Could not create config directory: {}\n", toStr(err));
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user