13
0
geforkt von Mirrors/Paper

Log IOException in plugin update (#7960)

Dieser Commit ist enthalten in:
Pedro 2022-07-18 05:31:33 -04:00
Ursprung ea72c007be
Commit 20a1a62469

Datei anzeigen

@ -48,16 +48,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ 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.renameTo(newName);
+ updateFile.delete();
+ return newName;
+ }
+ }
}
+ catch (InvalidDescriptionException e) {
+ throw new InvalidPluginException(e);
}
+ }
+ return file;
+ }