From 4ef21f68da177624128653f26da75b530bc39e8d Mon Sep 17 00:00:00 2001 From: adam-m Date: Tue, 12 Feb 2013 13:07:48 -0500 Subject: [PATCH] rename methods to get case modules output dirs. Make sure the dirs are created. --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index c34bbaf254..34c5c0fab1 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -558,8 +558,8 @@ public class Case { * The directory is a subdirectory of this case dir. * @return absolute path to the module output dir */ - public String getModulesOutputDirectoryPath() { - return this.getCaseDirectory() + File.separator + getModulesOutputDirectory(); + public String getModulesOutputDirAbsPath() { + return this.getCaseDirectory() + File.separator + getModulesOutputDirRelPath(); } @@ -569,7 +569,7 @@ public class Case { * The directory is a subdirectory of this case dir. * @return relative path to the module output dir */ - public String getModulesOutputDirectory() { + public static String getModulesOutputDirRelPath() { return "ModuleOutput"; } @@ -767,6 +767,13 @@ public class Case { if (result == false) { throw new CaseActionException("Could not create case directory: " + caseDir + " for case: " + caseName); } + + final String modulesOutDir = caseDir + File.separator + getModulesOutputDirRelPath(); + result = new File(modulesOutDir).mkdir(); + if (result == false) { + throw new CaseActionException("Could not create modules output directory: " + modulesOutDir + " for case: " + caseName); + } + } catch (Exception e) { throw new CaseActionException("Could not create case directory: " + caseDir + " for case: " + caseName, e); }