From bd9cc5cfcb4bb283aaeb6758b987b4559fddae02 Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 5 Apr 2023 20:55:29 +0000 Subject: [PATCH] Fix drag and drop sometimes having the wrong target --- app/src/main/java/io/xpipe/app/browser/FileListCompEntry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/xpipe/app/browser/FileListCompEntry.java b/app/src/main/java/io/xpipe/app/browser/FileListCompEntry.java index 728dce1fb..4ddd72b83 100644 --- a/app/src/main/java/io/xpipe/app/browser/FileListCompEntry.java +++ b/app/src/main/java/io/xpipe/app/browser/FileListCompEntry.java @@ -125,7 +125,7 @@ public class FileListCompEntry { // Accept drops from inside the app window if (event.getGestureSource() != null) { var files = FileBrowserClipboard.retrieveDrag(event.getDragboard()).getEntries(); - var target = item != null + var target = item != null && item.isDirectory() ? item : model.getFileSystemModel().getCurrentDirectory(); model.getFileSystemModel().dropFilesIntoAsync(target, files, false);