[nostalgia/studio] Fix config dir creation not create duplicate dirs

This commit is contained in:
Gary Talent 2022-12-17 14:00:39 -06:00
parent 839a791ddd
commit 9b36381b00

View File

@ -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;
}