1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Work with full file paths instead of partial ones.

This commit is contained in:
Frank Zago
2009-10-10 01:42:33 +00:00
parent 1392df17dc
commit 668b203486
5 changed files with 11 additions and 19 deletions

View File

@ -1848,14 +1848,14 @@ void CGameHandler::save( const std::string &fname )
{
tlog0 << "Serializing game info...\n";
CSaveFile save(std::string("Games/") + fname + ".vlgm1");
CSaveFile save(std::string(DATA_DIR "/Games/") + fname + ".vlgm1");
char hlp[8] = "VCMISVG";
save << hlp << static_cast<CMapHeader&>(*gs->map) << gs->scenarioOps->difficulty << *VLC << gs;
}
{
tlog0 << "Serializing server info...\n";
CSaveFile save(std::string("Games/") + fname + ".vsgm1");
CSaveFile save(std::string(DATA_DIR "/Games/") + fname + ".vsgm1");
save << *this;
}
tlog0 << "Game has been succesfully saved!\n";