From 36e40665bb51a76f36a459524c8419c5b9e403f3 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 1 Oct 2022 13:48:46 -0400 Subject: [PATCH] fix: don't hardcode path for global.sav (#1656) Co-authored-by: briaguya --- soh/soh/SaveManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index 1eafcf642..80ed3648a 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -543,7 +543,10 @@ void SaveManager::SaveGlobal() { globalBlock["zTargetSetting"] = gSaveContext.zTargetSetting; globalBlock["language"] = gSaveContext.language; - std::ofstream output("Save/global.sav"); + const std::filesystem::path sSavePath(Ship::Window::GetPathRelativeToAppDirectory("Save")); + const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav"); + + std::ofstream output(sGlobalPath); output << std::setw(4) << globalBlock << std::endl; }