From f3dda44f8c4f0aa6e5525c170e62b11d348bcf83 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 15 Aug 2012 10:47:46 +0000 Subject: [PATCH] * set unixfs system property via filebot option -unixfs rather than -Dunixfs=true in the startup scripts --- installer/deb/filebot.sh | 2 +- installer/ipkg/filebot.sh | 2 +- installer/portable/filebot.sh | 2 +- source/net/sourceforge/filebot/Main.java | 5 +++++ source/net/sourceforge/filebot/cli/ArgumentBean.java | 3 +++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/installer/deb/filebot.sh b/installer/deb/filebot.sh index e602ecaa..a8361538 100644 --- a/installer/deb/filebot.sh +++ b/installer/deb/filebot.sh @@ -1,2 +1,2 @@ #!/bin/bash -java -Dunixfs=false -Xmx256m -Dapplication.deployment=deb -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 -jar /usr/share/filebot/FileBot.jar "$@" +java -Xmx256m -Dapplication.deployment=deb -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 -jar /usr/share/filebot/FileBot.jar "$@" diff --git a/installer/ipkg/filebot.sh b/installer/ipkg/filebot.sh index 2b08b588..83afb9c5 100644 --- a/installer/ipkg/filebot.sh +++ b/installer/ipkg/filebot.sh @@ -1,2 +1,2 @@ #!/bin/bash -java -Dunixfs=false -Dapplication.deployment=ipkg -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 -jar /usr/share/filebot/FileBot.jar "$@" +java -Dapplication.deployment=ipkg -Dapplication.dir=$HOME/.filebot -Djava.io.tmpdir=$HOME/.filebot/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 -jar /usr/share/filebot/FileBot.jar "$@" diff --git a/installer/portable/filebot.sh b/installer/portable/filebot.sh index 51fe0a92..e3b6cfc9 100644 --- a/installer/portable/filebot.sh +++ b/installer/portable/filebot.sh @@ -3,4 +3,4 @@ SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done dir_bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -java -Dunixfs=false -Xmx256m -Dapplication.deployment=portable "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory -Dnet.sourceforge.tuned.prefs.file=prefs.properties -jar "$dir_bin/FileBot.jar" "$@" \ No newline at end of file +java -Xmx256m -Dapplication.deployment=portable "-Dapplication.dir=$dir_bin" "-Djava.io.tmpdir=$dir_bin/temp" "-Duser.home=$dir_bin" "-Djna.library.path=$dir_bin" "-Djava.library.path=$dir_bin" -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 -Djava.util.prefs.PreferencesFactory=net.sourceforge.tuned.prefs.FilePreferencesFactory -Dnet.sourceforge.tuned.prefs.file=prefs.properties -jar "$dir_bin/FileBot.jar" "$@" \ No newline at end of file diff --git a/source/net/sourceforge/filebot/Main.java b/source/net/sourceforge/filebot/Main.java index e5455130..3d909705 100644 --- a/source/net/sourceforge/filebot/Main.java +++ b/source/net/sourceforge/filebot/Main.java @@ -106,6 +106,11 @@ public class Main { CacheManager.getInstance().clearAll(); } + // set unixfs system property + if (args.unixfs) { + System.setProperty("unixfs", "true"); + } + // initialize analytics Analytics.setEnabled(!args.disableAnalytics); diff --git a/source/net/sourceforge/filebot/cli/ArgumentBean.java b/source/net/sourceforge/filebot/cli/ArgumentBean.java index 9b54ac5a..6f93229f 100644 --- a/source/net/sourceforge/filebot/cli/ArgumentBean.java +++ b/source/net/sourceforge/filebot/cli/ArgumentBean.java @@ -93,6 +93,9 @@ public class ArgumentBean { @Option(name = "-clear", usage = "Clear cache and application settings") public boolean clear = false; + @Option(name = "-unixfs", usage = "Do not strip invalid characters from file paths") + public boolean unixfs = false; + @Option(name = "-no-analytics", usage = "Disable analytics") public boolean disableAnalytics = false;