mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 05:51:31 -04:00
JDK8: Make sure to avoid java.awt.HeadlessException if Desktop.moveToTrash() is called on headless Linux devices (possible issue breaking -revert on some Linux devices)
This commit is contained in:
parent
b48da1a48c
commit
1173cbe337
12
jdk8.patch
12
jdk8.patch
@ -1,5 +1,5 @@
|
|||||||
diff --git a/app.properties b/app.properties
|
diff --git a/app.properties b/app.properties
|
||||||
index 755d034a..9f77f227 100644
|
index 62b16cd1..eeeb1494 100644
|
||||||
--- a/app.properties
|
--- a/app.properties
|
||||||
+++ b/app.properties
|
+++ b/app.properties
|
||||||
@@ -35,11 +35,12 @@ link.release.index: https://get.filebot.net/filebot
|
@@ -35,11 +35,12 @@ link.release.index: https://get.filebot.net/filebot
|
||||||
@ -29,7 +29,7 @@ index 755d034a..9f77f227 100644
|
|||||||
# Default Windows Java Options
|
# Default Windows Java Options
|
||||||
windows.application.options: -Dapplication.help=show -Dapplication.dir="%APPDATA%\\FileBot" -Dapplication.dir="%APPDATA%\\FileBot" -Djava.io.tmpdir="%APPDATA%\\FileBot\\tmp" -Dnet.filebot.AcoustID.fpcalc="%EXEDIR%\\lib\\fpcalc.exe" -Djna.boot.library.path="%EXEDIR%\\lib" -Djna.library.path="%EXEDIR%\\lib" -Djava.library.path="%EXEDIR%\\lib"
|
windows.application.options: -Dapplication.help=show -Dapplication.dir="%APPDATA%\\FileBot" -Dapplication.dir="%APPDATA%\\FileBot" -Djava.io.tmpdir="%APPDATA%\\FileBot\\tmp" -Dnet.filebot.AcoustID.fpcalc="%EXEDIR%\\lib\\fpcalc.exe" -Djna.boot.library.path="%EXEDIR%\\lib" -Djna.library.path="%EXEDIR%\\lib" -Djava.library.path="%EXEDIR%\\lib"
|
||||||
diff --git a/build.xml b/build.xml
|
diff --git a/build.xml b/build.xml
|
||||||
index d4b82928..1661247f 100644
|
index e4fa7677..b134fc3d 100644
|
||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -96,9 +96,10 @@
|
@@ -96,9 +96,10 @@
|
||||||
@ -76,7 +76,7 @@ index d4b82928..1661247f 100644
|
|||||||
<property name="dir.staging" location="${dir.dist}/msi/${msi.package.platform}" />
|
<property name="dir.staging" location="${dir.dist}/msi/${msi.package.platform}" />
|
||||||
|
|
||||||
diff --git a/ivy.xml b/ivy.xml
|
diff --git a/ivy.xml b/ivy.xml
|
||||||
index f1395934..bc7531be 100644
|
index 8f413c72..73800510 100644
|
||||||
--- a/ivy.xml
|
--- a/ivy.xml
|
||||||
+++ b/ivy.xml
|
+++ b/ivy.xml
|
||||||
@@ -26,7 +26,7 @@
|
@@ -26,7 +26,7 @@
|
||||||
@ -125,7 +125,7 @@ index 7e393cac..5eb3dadd 100644
|
|||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
diff --git a/source/net/filebot/UserFiles.java b/source/net/filebot/UserFiles.java
|
diff --git a/source/net/filebot/UserFiles.java b/source/net/filebot/UserFiles.java
|
||||||
index 660c7cef..d551a310 100644
|
index bb0f65de..25b687ab 100644
|
||||||
--- a/source/net/filebot/UserFiles.java
|
--- a/source/net/filebot/UserFiles.java
|
||||||
+++ b/source/net/filebot/UserFiles.java
|
+++ b/source/net/filebot/UserFiles.java
|
||||||
@@ -2,7 +2,6 @@ package net.filebot;
|
@@ -2,7 +2,6 @@ package net.filebot;
|
||||||
@ -157,8 +157,8 @@ index 660c7cef..d551a310 100644
|
|||||||
|
|
||||||
public static void trash(File file) throws IOException {
|
public static void trash(File file) throws IOException {
|
||||||
// use system trash if possible
|
// use system trash if possible
|
||||||
- if (Desktop.getDesktop().isSupported(Desktop.Action.MOVE_TO_TRASH)) {
|
- if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.MOVE_TO_TRASH)) {
|
||||||
+ if (FileUtils.getInstance().hasTrash()) {
|
+ if (Desktop.isDesktopSupported() && FileUtils.getInstance().hasTrash()) {
|
||||||
try {
|
try {
|
||||||
- if (Desktop.getDesktop().moveToTrash(file)) {
|
- if (Desktop.getDesktop().moveToTrash(file)) {
|
||||||
- return;
|
- return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user