Fix drag and drop sometimes having the wrong target

This commit is contained in:
crschnick 2023-04-05 20:55:29 +00:00
parent 7eb840e5a8
commit bd9cc5cfcb

View file

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