mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-10 21:38:04 -05:00
Fix error prone code
This commit is contained in:
parent
396815015f
commit
9af9706e4a
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user