Android: Use correct temporary path (#7463)
authorstujones11 <stujones111@gmail.com>
Sat, 23 Jun 2018 20:38:19 +0000 (21:38 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Thu, 28 Jun 2018 17:11:01 +0000 (19:11 +0200)
src/filesys.cpp

index bd8b94aff98ff86ebf2ca6a0a5383c4625fd8717..f60e9218be0cf31d8b460d58946cc0498383c93a 100644 (file)
@@ -27,6 +27,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "log.h"
 #include "config.h"
 #include "porting.h"
+#ifdef __ANDROID__
+#include "settings.h" // For g_settings
+#endif
 
 namespace fs
 {
@@ -374,7 +377,7 @@ std::string TempPath()
                configuration hardcodes mkstemp("/tmp/lua_XXXXXX").
        */
 #ifdef __ANDROID__
-       return DIR_DELIM "sdcard" DIR_DELIM PROJECT_NAME DIR_DELIM "tmp";
+       return g_settings->get("TMPFolder");
 #else
        return DIR_DELIM "tmp";
 #endif