diff --git a/app/build.gradle b/app/build.gradle index c8b30632..138e884b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -163,7 +163,7 @@ task runAttachedDebugger(type: JavaExec) { modularity.inferModulePath = true jvmArgs += jvmRunArgs jvmArgs += List.of( - "-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.1.jar=port:7857,host:localhost".toString(), + "-javaagent:${System.getProperty("user.home")}/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost".toString(), "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0" ) jvmArgs += '-XX:+EnableDynamicAgentLoading' diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserTransferComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserTransferComp.java index 49a648a7..e9db5190 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserTransferComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserTransferComp.java @@ -21,8 +21,11 @@ import javafx.scene.layout.AnchorPane; import javafx.scene.layout.Region; import org.kordamp.ikonli.javafx.FontIcon; +import java.io.File; import java.io.IOException; +import java.nio.file.Files; import java.util.List; +import java.util.Optional; public class BrowserTransferComp extends SimpleComp { @@ -123,13 +126,19 @@ public class BrowserTransferComp extends SimpleComp { var files = stage.getItems().stream() .map(item -> { try { - return item.getLocalFile() + var file = item.getLocalFile(); + if (!Files.exists(file)) { + return Optional.empty(); + } + + return Optional.of(file .toRealPath() - .toFile(); + .toFile()); } catch (IOException e) { throw new RuntimeException(e); } }) + .flatMap(Optional::stream) .toList(); Dragboard db = struc.get().startDragAndDrop(TransferMode.MOVE); var cc = new ClipboardContent(); @@ -146,6 +155,7 @@ public class BrowserTransferComp extends SimpleComp { event.consume(); }); struc.get().setOnDragDone(event -> { + // macOS does always report false here if (!event.isAccepted()) { return; } diff --git a/app/src/main/java/io/xpipe/app/core/AppResources.java b/app/src/main/java/io/xpipe/app/core/AppResources.java index 19f0c21e..ec0bc911 100644 --- a/app/src/main/java/io/xpipe/app/core/AppResources.java +++ b/app/src/main/java/io/xpipe/app/core/AppResources.java @@ -25,8 +25,10 @@ public class AppResources { fileSystems.forEach((s, moduleFileSystem) -> { try { moduleFileSystem.close(); - } catch (IOException e) { - ErrorEvent.fromThrowable(e).handle(); + } catch (IOException ignored) { + // Usually when updating, a SIGTERM is sent to this application. + // However, it takes a while to shut down but the installer is deleting files meanwhile. + // It can happen that the jar it does not exist anymore } }); fileSystems.clear(); diff --git a/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java b/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java index 698c32ee..c5eda535 100644 --- a/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java +++ b/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java @@ -161,6 +161,7 @@ public class SentryErrorHandler implements ErrorHandler { : "false"); s.setTag("terminal", Boolean.toString(ee.isTerminal())); s.setTag("omitted", Boolean.toString(ee.isOmitted())); + s.setTag("diagnostics", Boolean.toString(ee.isShouldSendDiagnostics())); var exMessage = ee.getThrowable() != null ? ee.getThrowable().getMessage() : null; if (ee.getDescription() != null && !ee.getDescription().equals(exMessage) && ee.isShouldSendDiagnostics()) { diff --git a/app/src/main/java/io/xpipe/app/update/HomebrewUpdater.java b/app/src/main/java/io/xpipe/app/update/HomebrewUpdater.java index d5dfe054..8e091d57 100644 --- a/app/src/main/java/io/xpipe/app/update/HomebrewUpdater.java +++ b/app/src/main/java/io/xpipe/app/update/HomebrewUpdater.java @@ -15,6 +15,12 @@ public class HomebrewUpdater extends GitHubUpdater { @Override public Region createInterface() { var snippet = CodeSnippet.builder() + .keyword("brew") + .space() + .keyword("update") + .space() + .identifier("&&") + .space() .keyword("brew") .space() .keyword("upgrade") diff --git a/dist/debug/linux/debug_attach_arguments.txt b/dist/debug/linux/debug_attach_arguments.txt index 7183922c..405f4bd8 100644 --- a/dist/debug/linux/debug_attach_arguments.txt +++ b/dist/debug/linux/debug_attach_arguments.txt @@ -1,2 +1,2 @@ --javaagent:$HOME/.attachme/attachme-agent-1.2.1.jar=port:7857,host:localhost +-javaagent:$HOME/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0 \ No newline at end of file diff --git a/dist/debug/mac/debug_attach_arguments.txt b/dist/debug/mac/debug_attach_arguments.txt index 7183922c..405f4bd8 100644 --- a/dist/debug/mac/debug_attach_arguments.txt +++ b/dist/debug/mac/debug_attach_arguments.txt @@ -1,2 +1,2 @@ --javaagent:$HOME/.attachme/attachme-agent-1.2.1.jar=port:7857,host:localhost +-javaagent:$HOME/.attachme/attachme-agent-1.2.4.jar=port:7857,host:localhost -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0 \ No newline at end of file diff --git a/dist/debug/windows/debug_attach_arguments.txt b/dist/debug/windows/debug_attach_arguments.txt index c52d43a8..572fc18d 100644 --- a/dist/debug/windows/debug_attach_arguments.txt +++ b/dist/debug/windows/debug_attach_arguments.txt @@ -1,2 +1,2 @@ --javaagent:%userprofile%\\.attachme\\attachme-agent-1.2.1.jar=port:7857,host:localhost +-javaagent:%userprofile%\\.attachme\\attachme-agent-1.2.4.jar=port:7857,host:localhost -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:0 \ No newline at end of file