EvtMainFrame: fix getSaveDirectory.

Using Directory::home() on systems with OneDrive returns a
fucked-by-OneDrive path, so I use another way now.
This commit is contained in:
Guillaume Jacquemin 2020-01-09 21:40:33 +01:00
parent 65e33fc332
commit a3ca557760
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ void EvtMainFrame::timerEvent(wxTimerEvent&) {
}
void EvtMainFrame::getSaveDirectory() {
_saveDirectory = Utility::Directory::path(Utility::Directory::home()) + "/AppData/Local/MASS_Builder/Saved/SaveGames";
_saveDirectory = Utility::Directory::join(Utility::Directory::fromNativeSeparators(getenv("localappdata")), "MASS_Builder/Saved/SaveGames");
if(!Utility::Directory::exists(_saveDirectory)) {
errorMessage("Couldn't find the M.A.S.S. Builder save directory at " + _saveDirectory + ". Please run the game at least once to create it.");