From 770c9eb309524c8df0d75437cddd47b8717d9db3 Mon Sep 17 00:00:00 2001 From: crschnick Date: Tue, 12 Mar 2024 08:30:58 +0000 Subject: [PATCH] Properly trim file path everywhere in chooser --- .../app/fxcomps/impl/ContextualFileReferenceChoiceComp.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java index e4ac6b2c2..8652a6660 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/ContextualFileReferenceChoiceComp.java @@ -85,8 +85,8 @@ public class ContextualFileReferenceChoiceComp extends SimpleComp { try { var data = DataStorage.get().getDataDir(); - var f = data.resolve(FileNames.getFileName(filePath.getValue())); - var source = Path.of(filePath.getValue()); + var f = data.resolve(FileNames.getFileName(filePath.getValue().trim())); + var source = Path.of(filePath.getValue().trim()); if (Files.exists(source)) { var shouldCopy = AppWindowHelper.showBlockingAlert(alert -> { alert.setTitle(AppI18n.get("confirmGitShareTitle"));