From 396815015fbb1d40f540cbaa14f9b7d7fb60830b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 26 Nov 2016 01:19:17 +0800 Subject: [PATCH] Fix error prone code --- source/net/filebot/ApplicationFolder.java | 2 +- source/net/filebot/Main.java | 5 +++-- source/net/filebot/Settings.java | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/ApplicationFolder.java b/source/net/filebot/ApplicationFolder.java index f8a84f9c..7036c929 100644 --- a/source/net/filebot/ApplicationFolder.java +++ b/source/net/filebot/ApplicationFolder.java @@ -11,7 +11,7 @@ public enum ApplicationFolder { AppData(System.getProperty("application.dir", UserHome.resolve(".filebot").getPath())), - Temp(System.getProperty("java.io.tmpdir")), + TemporaryFiles(System.getProperty("java.io.tmpdir")), Cache(System.getProperty("application.cache", AppData.resolve("cache").getPath())); diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index 45243d05..f33ff5d6 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -108,8 +108,9 @@ public class Main { initializeSystemProperties(args); initializeLogging(args); - // make sure java.io.tmpdir exists - createFolders(ApplicationFolder.Temp.getFile()); + // make sure that these folders exist + ApplicationFolder.TemporaryFiles.getFile().mkdirs(); + ApplicationFolder.AppData.getFile().mkdirs(); // initialize this stuff before anything else CacheManager.getInstance(); diff --git a/source/net/filebot/Settings.java b/source/net/filebot/Settings.java index 6511d0f9..c1c45c5f 100644 --- a/source/net/filebot/Settings.java +++ b/source/net/filebot/Settings.java @@ -2,7 +2,6 @@ package net.filebot; import static net.filebot.Logging.*; -import java.io.File; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle;