diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-10 00:48:22 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-10 00:48:22 +0200 |
commit | cf32b575fd98c29ae5f20b58736acbd5bf4248ef (patch) | |
tree | 1846aa9dfef03d2940f989fe46a5acdf33eec738 /src/client.cpp | |
parent | 574bd5fa1ee45a7452d2e85941fa33f946b63eae (diff) | |
download | mana-cf32b575fd98c29ae5f20b58736acbd5bf4248ef.tar.gz mana-cf32b575fd98c29ae5f20b58736acbd5bf4248ef.tar.bz2 mana-cf32b575fd98c29ae5f20b58736acbd5bf4248ef.tar.xz mana-cf32b575fd98c29ae5f20b58736acbd5bf4248ef.zip |
Fixing unusable config.xml
If config variable screenshotDirectory has national symbols in it, the
client could not read cofig.xml, and always used default settings.
In order to get ready for a client release, now the config.xml does not
save the screenshot folder. The --screenshot-dir commandline option
is working as before, the value is just not permanent anymore. This
makes actually sense, since the options for update folder and config
folder are not permanent either.
This resolves http://bugs.manasource.org/view.php?id=112
Reviewed-by: Jaxad0127
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/client.cpp b/src/client.cpp index 8def205b..f1b363e9 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1222,21 +1222,13 @@ void Client::initScreenshotDir() mScreenshotDir = mOptions.screenshotDir; else { - std::string configScreenshotDir = - config.getValue("screenshotDirectory", ""); - if (!configScreenshotDir.empty()) - mScreenshotDir = configScreenshotDir; - else - { #ifdef WIN32 - mScreenshotDir = getSpecialFolderLocation(CSIDL_MYPICTURES); - if (mScreenshotDir.empty()) - mScreenshotDir = getSpecialFolderLocation(CSIDL_DESKTOP); + mScreenshotDir = getSpecialFolderLocation(CSIDL_MYPICTURES); + if (mScreenshotDir.empty()) + mScreenshotDir = getSpecialFolderLocation(CSIDL_DESKTOP); #else - mScreenshotDir = std::string(PHYSFS_getUserDir()) + "Desktop"; + mScreenshotDir = std::string(PHYSFS_getUserDir()) + "Desktop"; #endif - } - config.setValue("screenshotDirectory", mScreenshotDir); if (config.getValue("useScreenshotDirectorySuffix", true)) { |