Browse Source

Merged #209 "Plugin manager does not completely respect --noverify"

tags/v1.7.0
James Moger 9 years ago
parent
commit
0c083063b5
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/main/java/com/gitblit/manager/PluginManager.java

+ 5
- 1
src/main/java/com/gitblit/manager/PluginManager.java View File

protected File download(String url, boolean verifyChecksum) throws IOException { protected File download(String url, boolean verifyChecksum) throws IOException {
File file = downloadFile(url); File file = downloadFile(url);


if (!verifyChecksum) {
return file;
}

File sha1File = null; File sha1File = null;
try { try {
sha1File = downloadFile(url + ".sha1"); sha1File = downloadFile(url + ".sha1");


} }


if (sha1File == null && md5File == null && verifyChecksum) {
if (sha1File == null && md5File == null) {
throw new IOException("Missing SHA1 and MD5 checksums for " + url); throw new IOException("Missing SHA1 and MD5 checksums for " + url);
} }



Loading…
Cancel
Save