1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Use consistent temp folder path (#10892)

This commit is contained in:
rubenwardy
2021-02-07 15:27:24 +00:00
committed by GitHub
parent 4caf156be5
commit 3a8c37181a
6 changed files with 24 additions and 33 deletions

View File

@@ -27,9 +27,6 @@ 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
{
@@ -359,8 +356,9 @@ std::string TempPath()
compatible with lua's os.tmpname which under the default
configuration hardcodes mkstemp("/tmp/lua_XXXXXX").
*/
#ifdef __ANDROID__
return g_settings->get("TMPFolder");
return porting::path_cache;
#else
return DIR_DELIM "tmp";
#endif