From 1370e494faa008e85352700e5bcd2437f454beb1 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 21 Feb 2017 15:50:17 +0800 Subject: [PATCH] createIfNotExists --- source/net/filebot/cli/ScriptShellMethods.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/cli/ScriptShellMethods.java b/source/net/filebot/cli/ScriptShellMethods.java index 4b2985a4..42ce0857 100644 --- a/source/net/filebot/cli/ScriptShellMethods.java +++ b/source/net/filebot/cli/ScriptShellMethods.java @@ -267,10 +267,10 @@ public class ScriptShellMethods { return FileUtilities.copyAs(self, new File(destination, self.getName())); } - public static void createFileIfNotExists(File self) throws IOException { + public static void createIfNotExists(File self) throws IOException { if (!self.isFile()) { // create parent folder structure if necessary & create file - Files.createDirectories(self.getParentFile().toPath()); + Files.createDirectories(self.toPath().getParent()); Files.createFile(self.toPath()); } }