Skip to content
Permalink
Browse files

Merge pull request #5241 from thc202/api-install-copy-add-on

Copy the add-on installed through the API
  • Loading branch information...
kingthorin committed Mar 7, 2019
2 parents 3054279 + c534242 commit ae415ff5855976bd016faf47b4a67151501829fc
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java
@@ -278,6 +278,19 @@ boolean installLocalAddOnQuietly(Path file) {
}
}

File addOnFile;
try {
addOnFile = copyAddOnFileToLocalPluginFolder(ao);
} catch (FileAlreadyExistsException e) {
logger.warn("Unable to copy add-on, a file with the same name already exists.", e);
return false;
} catch (IOException e) {
logger.warn("Unable to copy add-on to local plugin folder.", e);
return false;
}

ao.setFile(addOnFile);

return install(ao);
}

0 comments on commit ae415ff

Please sign in to comment.
You can’t perform that action at this time.