diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java index 34ca7552b..0cfc72260 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java @@ -10,6 +10,7 @@ import io.xpipe.core.store.FileSystem; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.file.Files; import java.nio.file.Path; import java.time.Instant; import java.util.LinkedHashMap; @@ -40,12 +41,17 @@ public class BrowserFileTransferOperation { public static BrowserFileTransferOperation ofLocal(FileSystem.FileEntry target, List files, BrowserFileTransferMode transferMode, boolean checkConflicts, Consumer progress) { var entries = files.stream() .map(path -> { + if (!Files.exists(path)) { + return null; + } + try { return LocalFileSystem.getLocalFileEntry(path); } catch (Exception e) { throw new RuntimeException(e); } }) + .filter(entry -> entry != null) .toList(); return new BrowserFileTransferOperation(target, entries, transferMode, checkConflicts, progress); } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStore.java b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStore.java index 530357e90..965dac76c 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopApplicationStore.java @@ -26,6 +26,7 @@ public class DesktopApplicationStore extends JacksonizedValue implements DataSto public void checkComplete() throws Throwable { Validators.nonNull(desktop); Validators.isType(desktop, DesktopBaseStore.class); + desktop.checkComplete(); Validators.nonNull(path); } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStore.java b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStore.java index 06fc8bfad..dfa8ada7c 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopCommandStore.java @@ -24,6 +24,7 @@ public class DesktopCommandStore extends JacksonizedValue implements DataStore, public void checkComplete() throws Throwable { Validators.nonNull(environment); Validators.isType(environment, DesktopEnvironmentStore.class); + environment.checkComplete(); Validators.nonNull(script); } } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStore.java b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStore.java index 61ddc38b5..f0f86d8ae 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/desktop/DesktopEnvironmentStore.java @@ -36,6 +36,7 @@ public class DesktopEnvironmentStore extends JacksonizedValue public void checkComplete() throws Throwable { Validators.nonNull(base); Validators.isType(base, DesktopBaseStore.class); + base.checkComplete(); Validators.nonNull(terminal); Validators.nonNull(dialect); }