From 9af9706e4a195154d98a80e69c1f540a3ebb8af1 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 26 Nov 2016 01:23:56 +0800 Subject: [PATCH] Fix error prone code --- source/net/filebot/Main.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index f33ff5d6..cc7f5525 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -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); } }