Add way to duplicate files

This commit is contained in:
crschnick 2024-10-10 04:08:36 +00:00
parent 60e0b124db
commit 99999eeaec

View file

@ -157,7 +157,8 @@ public class BrowserFileTransferOperation {
var targetFile = FileNames.join(target.getPath(), FileNames.getFileName(sourceFile));
if (sourceFile.equals(targetFile)) {
return;
// Duplicate file by renaming it
targetFile = renameFileLoop(target.getFileSystem(), targetFile, source.getKind() == FileKind.DIRECTORY);
}
if (source.getKind() == FileKind.DIRECTORY && target.getFileSystem().directoryExists(targetFile)) {