mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10:23 +00:00
Fix downloads move not replacing files
This commit is contained in:
parent
02153ad23e
commit
7b601b8917
1 changed files with 2 additions and 1 deletions
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue