Android: Use correct temporary path (#7463)

master
stujones11 2018-06-23 21:38:19 +01:00 committed by SmallJoker
parent 968ce9af59
commit 6b72d8d090
1 changed files with 4 additions and 1 deletions

View File

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