From 41ed4f0a121e6fb6fe6b1fb533710249bb4d16bd Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 28 May 2024 15:19:08 -0400 Subject: [PATCH 1/2] app name used in tempdir --- Core/src/org/sleuthkit/autopsy/core/Installer.java | 5 +++-- thirdparty/pasco2/.project | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index e8b1c79196..374d5b8ccb 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -67,7 +67,7 @@ public class Installer extends ModuleInstall { private static final long serialVersionUID = 1L; private static final String JAVA_TEMP = "java.io.tmpdir"; - private static final String AUTOPSY_TEMP_DIR = "autopsy_temp"; + private static final String AUTOPSY_TEMP_DIR_SUFFIX = "_temp"; private static final String TSK_TEMP = "tsk.tmpdir"; private final List packageInstallers; @@ -93,7 +93,8 @@ public class Installer extends ModuleInstall { private static void setTskTemp() { try { String curTemp = System.getProperty(JAVA_TEMP, ""); - String tskTemp = curTemp + (curTemp.endsWith(File.separator) ? "" : File.separator) + AUTOPSY_TEMP_DIR; + String autopsyTempDir = StringUtils.defaultIfBlank(UserPreferences.getAppName(), "autopsy").replaceAll("[^a-zA-Z0-9_\\-]", "_") + AUTOPSY_TEMP_DIR_SUFFIX; + String tskTemp = Paths.get(StringUtils.defaultString(curTemp), autopsyTempDir).toString(); System.setProperty(TSK_TEMP, tskTemp); File tskTempDir = new File(tskTemp); tskTempDir.mkdirs(); diff --git a/thirdparty/pasco2/.project b/thirdparty/pasco2/.project index 454c782dbe..17a0007916 100644 --- a/thirdparty/pasco2/.project +++ b/thirdparty/pasco2/.project @@ -21,6 +21,17 @@ C:/Development/42six/trunk/thirdparty/pasco2/lib + + + 1715884364848 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + BIN_DIR From 2e2bd209bdb905ebbff68b99629dc661b4cf2547 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 28 May 2024 15:21:07 -0400 Subject: [PATCH 2/2] revert unnecessary change --- thirdparty/pasco2/.project | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/thirdparty/pasco2/.project b/thirdparty/pasco2/.project index 17a0007916..454c782dbe 100644 --- a/thirdparty/pasco2/.project +++ b/thirdparty/pasco2/.project @@ -21,17 +21,6 @@ C:/Development/42six/trunk/thirdparty/pasco2/lib - - - 1715884364848 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - BIN_DIR