Android: Use correct temporary path (#7463)
authorstujones11 <stujones111@gmail.com>
Sat, 23 Jun 2018 20:38:19 +0000 (21:38 +0100)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sat, 23 Jun 2018 20:38:19 +0000 (22:38 +0200)
src/filesys.cpp

index 694169d2071a7ad24acffaed6f069ef615ed15be..f961dedc685c8ffefff309cfebe4cd30d189444c 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
 {
@@ -372,7 +375,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