diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-15 02:18:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-15 02:23:36 +0300 |
commit | 99bc9d1fb4bccae0785d731711e3b1009de1b394 (patch) | |
tree | e2ff1d19052011eceaa11baec788e5808dc68a3c /src/client.cpp | |
parent | a72b60b50e639bcd309baadf4199252510cb8118 (diff) | |
download | plus-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.gz plus-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.bz2 plus-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.xz plus-99bc9d1fb4bccae0785d731711e3b1009de1b394.zip |
Replace some hardcoded dir separator to physfs.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/client.cpp b/src/client.cpp index ed3656ee0..4bd60e977 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -443,7 +443,8 @@ void Client::gameInit() } else { - mOptions.dataPath = branding.getDirectory() + "/" + mOptions.dataPath = branding.getDirectory() + + PHYSFS_getDirSeparator() + branding.getStringValue("dataPath"); } mOptions.skipUpdate = true; @@ -1137,17 +1138,17 @@ int Client::gameExec() } else if (loginData.updateType & LoginData::Upd_Skip) { - UpdaterWindow::loadLocalUpdates(mLocalDataDir + "/" - + mUpdatesDir); + UpdaterWindow::loadLocalUpdates(mLocalDataDir + + PHYSFS_getDirSeparator() + mUpdatesDir); mState = STATE_LOAD_DATA; } else { logger->log1("State: UPDATE"); mCurrentDialog = new UpdaterWindow(mUpdateHost, - mLocalDataDir + "/" + mUpdatesDir, - mOptions.dataPath.empty(), - loginData.updateType); + mLocalDataDir + PHYSFS_getDirSeparator() + + mUpdatesDir, mOptions.dataPath.empty(), + loginData.updateType); } break; @@ -1175,7 +1176,8 @@ int Client::gameExec() "zip", false); - resman->addToSearchPath(mLocalDataDir + "/" + resman->addToSearchPath(mLocalDataDir + + PHYSFS_getDirSeparator() + mUpdatesDir + "/local/", false); } @@ -1610,7 +1612,7 @@ void Client::initConfigDir() if (mConfigDir.empty()) { #ifdef __APPLE__ - mConfigDir = mLocalDataDir + "/" + mConfigDir = mLocalDataDir + PHYSFS_getDirSeparator() + branding.getValue("appShort", "mana"); #elif defined __HAIKU__ mConfigDir = std::string(PHYSFS_getUserDir()) + @@ -1642,7 +1644,7 @@ void Client::initConfigDir() */ void Client::initServerConfig(std::string serverName) { - mServerConfigDir = mConfigDir + "/" + serverName; + mServerConfigDir = mConfigDir + PHYSFS_getDirSeparator() + serverName; if (mkdir_r(mServerConfigDir.c_str())) { @@ -1877,7 +1879,7 @@ void Client::initScreenshotDir() if (!configScreenshotSuffix.empty()) { - mScreenshotDir += "/" + configScreenshotSuffix; + mScreenshotDir += PHYSFS_getDirSeparator() + configScreenshotSuffix; // config.setValue("screenshotDirectorySuffix", // configScreenshotSuffix); } |