From 5ad7366213d464fe7b430620f152fc2e6cda86da Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 2 Jan 2018 17:54:20 -0300 Subject: [PATCH] Fix saving replay data file saving when Save/Replays doesnt exist --- src/HighScore.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/HighScore.cpp b/src/HighScore.cpp index 92975f26d3..23427e8c85 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -13,6 +13,7 @@ #include #include "CryptManager.h" #include "ProfileManager.h" +#include "RageFileManager.h" ThemeMetric EMPTY_NAME("HighScore","EmptyName"); @@ -580,7 +581,9 @@ void HighScoreImpl::LoadFromNode(const XNode *pNode) bool HighScoreImpl::WriteReplayData() { string append; string profiledir; - + //These two lines should probably be somewhere else + if (!FILEMAN->IsADirectory(REPLAY_DIR)) + FILEMAN->CreateDir(REPLAY_DIR); string path = REPLAY_DIR + ScoreKey; ofstream fileStream(path, ios::binary); //check file