Replace exisiting on move to avoid random FileAlreadyExistsException
This commit is contained in:
parent
5f9716adc5
commit
ddce10f6ab
|
@ -60,7 +60,7 @@ public class FileHelper {
|
|||
} catch (FileNotFoundException | NoSuchFileException ignore) {
|
||||
} catch (IOException ex) {
|
||||
try {
|
||||
Files.move(from, to);
|
||||
Files.move(from, to, StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (FileNotFoundException | NoSuchFileException ignore) {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue