From d583722da5edb26b230c514b7f09a5dfa602fd9c Mon Sep 17 00:00:00 2001 From: adam-m Date: Wed, 13 Feb 2013 11:20:19 -0500 Subject: [PATCH] fix create modulesout only if it doesn't exist --- .../org/sleuthkit/autopsy/casemodule/Case.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 22f597baec..f28585202b 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -855,20 +855,22 @@ public class Case { /** * Check for existence of certain case sub dirs and create them if needed. - * @param openedCase + * + * @param openedCase */ private static void checkSubFolders(Case openedCase) { String modulesOutputDir = openedCase.getModulesOutputDirAbsPath(); File modulesOutputDirF = new File(modulesOutputDir); if (!modulesOutputDirF.exists()) { logger.log(Level.INFO, "Creating modules output dir for the case."); - } - try { - if (! modulesOutputDirF.mkdir() ) { - logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir); + + try { + if (!modulesOutputDirF.mkdir()) { + logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir); + } + } catch (SecurityException e) { + logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir, e); } - } catch (SecurityException e) { - logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir, e); } }