From 5974367fd1e364508425649f60a9f46be15bf836 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 7 May 2016 17:01:39 +0800 Subject: [PATCH] Fix `-DuseExtendedFileAttributes=false NOT WORKING` issues --- source/net/filebot/Main.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index cc856766..bb2142ce 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -363,10 +363,16 @@ public class Main { System.setProperty("grape.root", ApplicationFolder.AppData.resolve("grape").getAbsolutePath()); System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); - System.setProperty("unixfs", Boolean.toString(args.unixfs)); - System.setProperty("useExtendedFileAttributes", Boolean.toString(!args.disableExtendedAttributes)); - System.setProperty("useCreationDate", Boolean.toString(!args.disableExtendedAttributes)); - System.setProperty("application.rename.history", Boolean.toString(!args.action.equalsIgnoreCase("test"))); // do not keep history of --action test rename operations + if (args.unixfs) { + System.setProperty("unixfs", "true"); + } + if (args.disableExtendedAttributes) { + System.setProperty("useExtendedFileAttributes", "false"); + System.setProperty("useCreationDate", "false"); + } + if (args.action.equalsIgnoreCase("test")) { + System.setProperty("application.rename.history", "false"); // do not keep history of --action test rename operations + } } public static void initializeLogging(ArgumentBean args) throws IOException {