mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
Fix plugin update IO logic when replacing jars
This commit is contained in:
parent
46a9d2a4ac
commit
44b6869fd2
@ -5,7 +5,7 @@ Subject: [PATCH] Update Folder Uses Plugin Name
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 94646b37c77fcb18fc4030306c431684e7e9a5cc..1c9d0a81d581d0e6a8b2551a2cb9ed5e18bb2991 100644
|
||||
index 94646b37c77fcb18fc4030306c431684e7e9a5cc..9db611841b73fed8dc8a71f4d7fdef95af3cf89d 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -396,7 +396,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@ -49,7 +49,7 @@ index 94646b37c77fcb18fc4030306c431684e7e9a5cc..1c9d0a81d581d0e6a8b2551a2cb9ed5e
|
||||
+ }
|
||||
+ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user