Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 13298)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 13300)
@@ -1258,11 +1258,4 @@
             File plugin = new File(filePath.substring(0, filePath.length() - 4));
             String pluginName = updatedPlugin.getName().substring(0, updatedPlugin.getName().length() - 8);
-            if (plugin.exists() && !plugin.delete() && dowarn) {
-                Logging.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
-                Logging.warn(tr("Failed to install already downloaded plugin ''{0}''. " +
-                        "Skipping installation. JOSM is still going to load the old plugin version.",
-                        pluginName));
-                continue;
-            }
             try {
                 // Check the plugin is a valid and accessible JAR file before installing it (fix #7754)
@@ -1273,4 +1266,11 @@
                             plugin.toString(), updatedPlugin.toString(), e.getLocalizedMessage()), e);
                 }
+                continue;
+            }
+            if (plugin.exists() && !plugin.delete() && dowarn) {
+                Logging.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
+                Logging.warn(tr("Failed to install already downloaded plugin ''{0}''. " +
+                        "Skipping installation. JOSM is still going to load the old plugin version.",
+                        pluginName));
                 continue;
             }
