From d4bb2d1d0e82ca9d046f9b2346a7893ca11e8d9c Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 21 Feb 2011 22:51:29 +0100 Subject: Renamed local data directory back to just "mana" This name represents the name of the client software, not the branding it received. Cleaned up the rest of the code a bit. Reviewed-by: Jared Adams --- src/client.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index 12564834..abe3500c 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1090,10 +1090,10 @@ void Client::initHomeDir() mLocalDataDir = getSpecialFolderLocation(CSIDL_LOCAL_APPDATA); if (mLocalDataDir.empty()) mLocalDataDir = std::string(PHYSFS_getUserDir()); - mLocalDataDir += "/manasource"; + mLocalDataDir += "/Mana"; #else mLocalDataDir = std::string(PHYSFS_getUserDir()) + - "/.local/share/manasource"; + "/.local/share/mana"; #endif } @@ -1105,18 +1105,19 @@ void Client::initHomeDir() mConfigDir = mOptions.configDir; - if (mConfigDir.empty()){ + if (mConfigDir.empty()) + { + const std::string app = branding.getValue("appShort", "manasource"); #ifdef __APPLE__ - mConfigDir = mLocalDataDir + "/" + branding.getValue("appShort", "manasource"); + mConfigDir = mLocalDataDir + "/" + app; #elif defined WIN32 mConfigDir = getSpecialFolderLocation(CSIDL_APPDATA); if (mConfigDir.empty()) mConfigDir = mLocalDataDir; else - mConfigDir += "/mana/" + branding.getValue("appShort", "manasource"); + mConfigDir += "/mana/" + app; #else - mConfigDir = std::string(PHYSFS_getUserDir()) + - "/.config/mana/" + branding.getValue("appShort", "manasource"); + mConfigDir = std::string(PHYSFS_getUserDir()) + "/.config/mana/" + app; #endif } -- cgit v1.2.3-70-g09d2