]> source.dussan.org Git - gitblit.git/commitdiff
Fix broken implementation of --noverify for installing a plugin from a url 09/209/1
authorJames Moger <james.moger@gitblit.com>
Thu, 23 Oct 2014 21:20:42 +0000 (17:20 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 23 Oct 2014 21:20:42 +0000 (17:20 -0400)
src/main/java/com/gitblit/manager/PluginManager.java

index 583037505e8d499a7c25a4e68a7832bac9286360..3e7bc1ff7da0c32340ea4f5d0fb31417e9d38e5e 100644 (file)
@@ -440,6 +440,10 @@ public class PluginManager implements IPluginManager, PluginStateListener {
        protected File download(String url, boolean verifyChecksum) throws IOException {
                File file = downloadFile(url);
 
+               if (!verifyChecksum) {
+                       return file;
+               }
+
                File sha1File = null;
                try {
                        sha1File = downloadFile(url + ".sha1");
@@ -453,7 +457,7 @@ public class PluginManager implements IPluginManager, PluginStateListener {
 
                }
 
-               if (sha1File == null && md5File == null && verifyChecksum) {
+               if (sha1File == null && md5File == null) {
                        throw new IOException("Missing SHA1 and MD5 checksums for " + url);
                }