Commit 7de869fe authored by Roumen Petrov's avatar Roumen Petrov

set environment variable TMPDIR to application "CacheDir"

parent 412cd469
......@@ -20,6 +20,8 @@
import com.termoneplus.utils.ThemeManager;
import java.io.File;
import androidx.preference.PreferenceManager;
......@@ -44,10 +46,23 @@
public static final String ARGUMENT_SHELL_COMMAND = "com.termoneplus.Command";
public static final String ARGUMENT_WINDOW_HANDLE = "com.termoneplus.WindowHandle";
private static File cachedir;
public static File getTmpDir() {
return cachedir;
}
public static String getTmpPath() {
return getTmpDir().getAbsolutePath();
}
@Override
public void onCreate() {
super.onCreate();
cachedir = getCacheDir();
setupPreferences();
ThemeManager.migrateFileSelectionThemeMode(this);
}
......
......@@ -106,10 +106,11 @@ private int createShellProcess(TermSettings settings, PathSettings path_settings
args = argList.toArray(new String[1]);
}
String[] env = new String[3];
String[] env = new String[4];
env[0] = "TERM=" + settings.getTermType();
env[1] = "PATH=" + path_settings.buildPATH();
env[2] = "HOME=" + settings.getHomePath();
env[3] = "TMPDIR=" + Application.getTmpPath();
return Process.createSubprocess(mTermFd, arg0, args, env);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment