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. * Check for existence of certain case sub dirs and create them if needed.
* @param openedCase *
* @param openedCase
*/ */
private static void checkSubFolders(Case openedCase) { private static void checkSubFolders(Case openedCase) {
String modulesOutputDir = openedCase.getModulesOutputDirAbsPath(); String modulesOutputDir = openedCase.getModulesOutputDirAbsPath();
File modulesOutputDirF = new File(modulesOutputDir); File modulesOutputDirF = new File(modulesOutputDir);
if (!modulesOutputDirF.exists()) { if (!modulesOutputDirF.exists()) {
logger.log(Level.INFO, "Creating modules output dir for the case."); logger.log(Level.INFO, "Creating modules output dir for the case.");
}
try { try {
if (! modulesOutputDirF.mkdir() ) { if (!modulesOutputDirF.mkdir()) {
logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir); 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);
} }
} }