1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

fix create modulesout only if it doesn't exist

This commit is contained in:
adam-m
2013-02-13 11:20:19 -05:00
parent 6816a1eaf1
commit d583722da5

View File

@@ -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);
}
}