mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-26 18:35:43 +00:00
Fix downloads move not replacing files
This commit is contained in:
@@ -22,6 +22,7 @@ import org.apache.commons.io.FileUtils;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -169,7 +170,7 @@ public class BrowserTransferModel {
|
||||
if (Files.isDirectory(file)) {
|
||||
FileUtils.moveDirectory(file.toFile(), target.toFile());
|
||||
} else {
|
||||
FileUtils.moveFile(file.toFile(), target.toFile());
|
||||
FileUtils.moveFile(file.toFile(), target.toFile(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
DesktopHelper.browseFileInDirectory(downloads.resolve(files.getFirst().getFileName()));
|
||||
|
||||
Reference in New Issue
Block a user