1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-16 18:31:53 +01:00

Fix plugin update IO logic when replacing jars

This commit is contained in:
Shane Freeder 2022-07-23 05:52:57 +01:00
parent 226468f7b0
commit f9f8a78753

View file

@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ if (!pluginName.equals(updatePluginName)) continue;
+ try {
+ java.nio.file.Files.copy(updateFile.toPath(), file.toPath());
+ java.nio.file.Files.copy(updateFile.toPath(), file.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
+ } catch (java.io.IOException exception) {
+ server.getLogger().log(Level.SEVERE, "Could not copy '" + updateFile.getPath() + "' to '" + file.getPath() + "' in update plugin process", exception);
+ continue;