fix: don't hardcode path for global.sav (#1656)

Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
briaguya 2022-10-01 13:48:46 -04:00 committed by GitHub
parent 9804035dc0
commit 36e40665bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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