geforkt von Mirrors/Paper
Log IOException in plugin update (#7960)
Dieser Commit ist enthalten in:
Ursprung
ea72c007be
Commit
20a1a62469
@ -48,16 +48,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+ if (!pluginName.equals(updatePluginName)) continue;
|
+ if (!pluginName.equals(updatePluginName)) continue;
|
||||||
+ if (!FileUtil.copy(updateFile, file)) continue;
|
+ try {
|
||||||
|
+ java.nio.file.Files.copy(updateFile.toPath(), file.toPath());
|
||||||
|
+ } catch (java.io.IOException exception) {
|
||||||
|
+ server.getLogger().log(Level.SEVERE, "Could not copy '" + updateFile.getPath() + "' to '" + file.getPath() + "' in update plugin process", exception);
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
+ File newName = new File(file.getParentFile(), updateFile.getName());
|
+ File newName = new File(file.getParentFile(), updateFile.getName());
|
||||||
+ file.renameTo(newName);
|
+ file.renameTo(newName);
|
||||||
+ updateFile.delete();
|
+ updateFile.delete();
|
||||||
+ return newName;
|
+ return newName;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
}
|
||||||
+ catch (InvalidDescriptionException e) {
|
+ catch (InvalidDescriptionException e) {
|
||||||
+ throw new InvalidPluginException(e);
|
+ throw new InvalidPluginException(e);
|
||||||
}
|
+ }
|
||||||
+ return file;
|
+ return file;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren