diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-21 01:03:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-21 01:03:17 +0300 |
commit | 83122fc4544395be73b1ecd1386cba4c3fc6ef20 (patch) | |
tree | eaf0318d438353a10f2c96f426db214d1401e7f0 /src/client.cpp | |
parent | 6637f4af57cd60008388bfefda1c37376c9d7042 (diff) | |
download | manaplus-83122fc4544395be73b1ecd1386cba4c3fc6ef20.tar.gz manaplus-83122fc4544395be73b1ecd1386cba4c3fc6ef20.tar.bz2 manaplus-83122fc4544395be73b1ecd1386cba4c3fc6ef20.tar.xz manaplus-83122fc4544395be73b1ecd1386cba4c3fc6ef20.zip |
Fix screenshot dir under Android.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index 208858555..0ec0647cb 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2102,7 +2102,14 @@ void Client::initScreenshotDir() else if (mScreenshotDir.empty()) { #ifdef __ANDROID__ - mLocalDataDir = getenv("DATADIR2") + std::string("/images"); + mScreenshotDir = getenv("DATADIR2") + std::string("/images"); + + if (mkdir_r(mScreenshotDir.c_str())) + { + logger->log(strprintf( + _("Error: %s doesn't exist and can't be created! " + "Exiting."), mScreenshotDir.c_str())); + } #else std::string configScreenshotDir = config.getStringValue("screenshotDirectory"); |