diff --git a/Core/src/com/basistech/df/cybertriage/autopsy/incidentoptions/CTSettings.java b/Core/src/com/basistech/df/cybertriage/autopsy/incidentoptions/CTSettings.java index 35e2d108eae0b1c5e7850e847a47cc8970c33baf..67abb34f7bd6111475a3e675046ea43b6cbbbe8e 100644 --- a/Core/src/com/basistech/df/cybertriage/autopsy/incidentoptions/CTSettings.java +++ b/Core/src/com/basistech/df/cybertriage/autopsy/incidentoptions/CTSettings.java @@ -20,6 +20,7 @@ import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; +import org.apache.commons.lang3.StringUtils; import org.openide.modules.Places; /** @@ -38,7 +39,11 @@ private static String getAppDataLocalDirectory() { LOGGER.log(Level.INFO, "Application Data (test mode) Path: " + Places.getUserDirectory().getAbsolutePath()); return Places.getUserDirectory().getAbsolutePath(); } else { - Path localAppPath = Paths.get(System.getenv("LOCALAPPDATA"), "cybertriage"); + + Path localAppPath = StringUtils.isBlank(System.getenv("LOCALAPPDATA")) + ? Places.getUserDirectory().toPath().toAbsolutePath() + : Paths.get(System.getenv("LOCALAPPDATA"), "cybertriage"); + try { Files.createDirectories(localAppPath); LOGGER.log(Level.INFO, "Application Data Path: " + localAppPath.toString());