diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java index 113afb304..8662924f4 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileTransferOperation.java @@ -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)) {