1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Fix error prone code

This commit is contained in:
Reinhard Pointner 2016-11-26 01:23:56 +08:00
parent 396815015f
commit 9af9706e4a

View File

@ -108,10 +108,6 @@ public class Main {
initializeSystemProperties(args);
initializeLogging(args);
// make sure that these folders exist
ApplicationFolder.TemporaryFiles.getFile().mkdirs();
ApplicationFolder.AppData.getFile().mkdirs();
// initialize this stuff before anything else
CacheManager.getInstance();
initializeSecurityManager();
@ -380,6 +376,10 @@ public class Main {
}
public static void initializeLogging(ArgumentBean args) throws IOException {
// make sure that these folders exist
ApplicationFolder.TemporaryFiles.getFile().mkdirs();
ApplicationFolder.AppData.getFile().mkdirs();
if (args.runCLI()) {
// CLI logging settings
log.setLevel(args.getLogLevel());
@ -394,7 +394,7 @@ public class Main {
log.addHandler(error);
debug.addHandler(error);
} catch (Exception e) {
debug.log(Level.WARNING, "Failed to initialize error log", e);
log.log(Level.WARNING, "Failed to initialize error log", e);
}
}