forked from I2P_Developers/i2p.i2p
check for mismatched versions
This commit is contained in:
@ -209,6 +209,8 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String sudVersion = TrustedUpdate.getVersionString(f);
|
||||
f.delete();
|
||||
|
||||
String appName = props.getProperty("name");
|
||||
@ -219,6 +221,11 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
updateStatus("<b>" + _("Plugin from {0} has invalid name or version", url) + "</b>");
|
||||
return;
|
||||
}
|
||||
if (!version.equals(sudVersion)) {
|
||||
to.delete();
|
||||
updateStatus("<b>" + _("Plugin {0} has mismatched versions", appName) + "</b>");
|
||||
return;
|
||||
}
|
||||
|
||||
// todo compare sud version with property version
|
||||
|
||||
@ -242,7 +249,7 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
if (destDir.exists()) {
|
||||
if (Boolean.valueOf(props.getProperty("install-only")).booleanValue()) {
|
||||
to.delete();
|
||||
updateStatus("<b>" + _("Downloaded plugin is not for upgrading but the plugin is already installed", url) + "</b>");
|
||||
updateStatus("<b>" + _("Downloaded plugin is for new installs only, but the plugin is already installed", url) + "</b>");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user