summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-21 01:03:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-21 01:03:17 +0300
commit83122fc4544395be73b1ecd1386cba4c3fc6ef20 (patch)
treeeaf0318d438353a10f2c96f426db214d1401e7f0
parent6637f4af57cd60008388bfefda1c37376c9d7042 (diff)
downloadmv-83122fc4544395be73b1ecd1386cba4c3fc6ef20.tar.gz
mv-83122fc4544395be73b1ecd1386cba4c3fc6ef20.tar.bz2
mv-83122fc4544395be73b1ecd1386cba4c3fc6ef20.tar.xz
mv-83122fc4544395be73b1ecd1386cba4c3fc6ef20.zip
Fix screenshot dir under Android.
-rw-r--r--src/client.cpp9
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");