Fix transfer move^

This commit is contained in:
crschnick 2024-09-12 21:05:38 +00:00
parent 5a0e12aa13
commit 94b5673565

View file

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