mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-4358: No longer using XDG_RUNTIME_DIR for temp directory. Ubuntu
defaults it to a too small tmpfs. (Closes #6233)
This commit is contained in:
@@ -246,7 +246,9 @@ public class AppCleaner implements GhidraLaunchable {
|
|||||||
getDirFromProperty(PROPERTY_TEMP_DIR, appName).ifPresent(discoveredDirs::add);
|
getDirFromProperty(PROPERTY_TEMP_DIR, appName).ifPresent(discoveredDirs::add);
|
||||||
getDirFromProperty(PROPERTY_TEMP_DIR, userNameAndAppName).ifPresent(discoveredDirs::add);
|
getDirFromProperty(PROPERTY_TEMP_DIR, userNameAndAppName).ifPresent(discoveredDirs::add);
|
||||||
|
|
||||||
// XDG environment variable override
|
// XDG environment variable override.
|
||||||
|
// This was used briefly in the master branch and then removed, so some users might have
|
||||||
|
// this artifact. We can eventually stop looking here.
|
||||||
getDirFromEnv(XDG_RUNTIME_DIR, appName).ifPresent(discoveredDirs::add);
|
getDirFromEnv(XDG_RUNTIME_DIR, appName).ifPresent(discoveredDirs::add);
|
||||||
getDirFromEnv(XDG_RUNTIME_DIR, userNameAndAppName).ifPresent(discoveredDirs::add);
|
getDirFromEnv(XDG_RUNTIME_DIR, userNameAndAppName).ifPresent(discoveredDirs::add);
|
||||||
|
|
||||||
|
|||||||
@@ -176,13 +176,6 @@ public class ApplicationUtilities {
|
|||||||
new File(tempOverrideDir, getUserSpecificDirName(tempOverrideDir, appName)));
|
new File(tempOverrideDir, getUserSpecificDirName(tempOverrideDir, appName)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for XDG environment variable
|
|
||||||
File xdgRuntimeDir = getEnvFile(XdgUtils.XDG_RUNTIME_DIR, false);
|
|
||||||
if (xdgRuntimeDir != null) {
|
|
||||||
return createDir(
|
|
||||||
new File(xdgRuntimeDir, getUserSpecificDirName(xdgRuntimeDir, appName)));
|
|
||||||
}
|
|
||||||
|
|
||||||
File javaTmpDir = getJavaTmpDir();
|
File javaTmpDir = getJavaTmpDir();
|
||||||
return createDir(new File(getJavaTmpDir(), getUserSpecificDirName(javaTmpDir, appName)));
|
return createDir(new File(getJavaTmpDir(), getUserSpecificDirName(javaTmpDir, appName)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,8 +116,7 @@ VMARGS=-Xshare:off
|
|||||||
# directory lives outside of the user's home directory. The temporary directory will be selected
|
# directory lives outside of the user's home directory. The temporary directory will be selected
|
||||||
# based on the following rules, in order of precedence:
|
# based on the following rules, in order of precedence:
|
||||||
# 1. System.getProperty("application.tempdir")/[user-]<application>
|
# 1. System.getProperty("application.tempdir")/[user-]<application>
|
||||||
# 2. System.getenv("XDG_RUNTIME_DIR")/[user-]<application>
|
# 2. System.getProperty("java.io.tmpdir")/[user-]<application>
|
||||||
# 3. System.getProperty("java.io.tmpdir")/[user-]<application>
|
|
||||||
# Unless overridden below, the "java.io.tmpdir" system property typically defaults to the following
|
# Unless overridden below, the "java.io.tmpdir" system property typically defaults to the following
|
||||||
# platform specific locations:
|
# platform specific locations:
|
||||||
# - Windows: %TEMP%
|
# - Windows: %TEMP%
|
||||||
|
|||||||
Reference in New Issue
Block a user