Properly trim file path everywhere in chooser

This commit is contained in:
crschnick 2024-03-12 08:30:58 +00:00
parent 1a29d14a79
commit 770c9eb309

View file

@ -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"));