diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserTransferModel.java b/app/src/main/java/io/xpipe/app/browser/BrowserTransferModel.java index a2ce2b029..5e5e0c24a 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserTransferModel.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserTransferModel.java @@ -166,7 +166,11 @@ public class BrowserTransferModel { if (Files.exists(target) && Files.isDirectory(target)) { FileUtils.deleteDirectory(target.toFile()); } - FileUtils.moveDirectory(file.toFile(),target.toFile()); + if (Files.isDirectory(file)) { + FileUtils.moveDirectory(file.toFile(), target.toFile()); + } else { + FileUtils.moveFile(file.toFile(), target.toFile()); + } } DesktopHelper.browseFileInDirectory(downloads.resolve(files.getFirst().getFileName())); }