1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-11 05:48:01 -05:00
This commit is contained in:
Reinhard Pointner 2016-03-08 16:21:10 +00:00
parent 7eb9192736
commit bd06ecb9e4

View File

@ -96,6 +96,9 @@ public class Main {
System.exit(0);
}
// update system properties
initializeSystemProperties(args);
// tee stdout and stderr to log file if set
if (args.logFile != null) {
File logFile = new File(args.logFile);
@ -127,20 +130,6 @@ public class Main {
CacheManager.getInstance();
initializeSecurityManager();
// update system properties
System.setProperty("http.agent", String.format("%s %s", getApplicationName(), getApplicationVersion()));
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
System.setProperty("sun.net.client.defaultReadTimeout", "60000");
System.setProperty("swing.crossplatformlaf", "javax.swing.plaf.nimbus.NimbusLookAndFeel");
System.setProperty("grape.root", new File(getApplicationFolder(), "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"))); // don't keep history of --action test rename operations
// make sure we can access application arguments at any time
setApplicationArgumentArray(argumentArray);
@ -431,4 +420,19 @@ public class Main {
}
}
public static void initializeSystemProperties(ArgumentBean args) {
System.setProperty("http.agent", String.format("%s %s", getApplicationName(), getApplicationVersion()));
System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
System.setProperty("sun.net.client.defaultReadTimeout", "60000");
System.setProperty("swing.crossplatformlaf", "javax.swing.plaf.nimbus.NimbusLookAndFeel");
System.setProperty("grape.root", new File(getApplicationFolder(), "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
}
}