--- a/src/common/filename.cpp
+++ b/src/common/filename.cpp
@@ -1247,7 +1247,7 @@ wxString wxFileName::GetTempDir()
     else
     {
 #ifdef __UNIX_LIKE__
-        dir = CheckIfDirExists("/tmp");
+        dir = CheckIfDirExists("@TERMUX_PREFIX@/tmp");
         if ( dir.empty() )
 #endif // __UNIX_LIKE__
             dir = ".";
