forked from mirror/BlueMap
Replace exisiting on move to avoid random FileAlreadyExistsException
This commit is contained in:
parent
5f9716adc5
commit
ddce10f6ab
@ -60,7 +60,7 @@ public static void move(Path from, Path to) throws IOException {
|
||||
} 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
Block a user