diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-23 17:20:42 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-23 17:20:42 -0400 |
commit | c57a28630e1ca45282137419e13ae88a954cc11b (patch) | |
tree | a95af4cad3a9a83a48bf85e9bc3d5f0887d848ec /src | |
parent | f6a71521877f67c91ad9f68ce209c242cbbc03e4 (diff) | |
download | gitblit-c57a28630e1ca45282137419e13ae88a954cc11b.tar.gz gitblit-c57a28630e1ca45282137419e13ae88a954cc11b.zip |
Fix broken implementation of --noverify for installing a plugin from a url
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/manager/PluginManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/manager/PluginManager.java b/src/main/java/com/gitblit/manager/PluginManager.java index 58303750..3e7bc1ff 100644 --- a/src/main/java/com/gitblit/manager/PluginManager.java +++ b/src/main/java/com/gitblit/manager/PluginManager.java @@ -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); } |