Skip to content

Commit

Permalink
Fix saving replay data file saving when Save/Replays doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Jan 2, 2018
1 parent 12cf2f2 commit 5ad7366
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sstream>
#include "CryptManager.h"
#include "ProfileManager.h"
#include "RageFileManager.h"

ThemeMetric<string> EMPTY_NAME("HighScore","EmptyName");

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5ad7366

Please sign in to comment.