Skip to content

Commit

Permalink
Merge pull request #5241 from thc202/api-install-copy-add-on
Browse files Browse the repository at this point in the history
Copy the add-on installed through the API
  • Loading branch information
kingthorin committed Mar 7, 2019
2 parents 3054279 + c534242 commit ae415ff
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java
Expand Up @@ -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);
}

Expand Down

0 comments on commit ae415ff

Please sign in to comment.