mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 07:35:53 +00:00
[JENKINS-13909] don't keep legacy *.hpi when uploading a plugin
even jenkins takes care to load jpi first, this is confusing
This commit is contained in:
1 parent
91b3d3c544
commit
de5938b3a6
1 file changed
+1
@@ -704,6 +704,7 @@ public abstract class PluginManager extends AbstractModelObject {
|
||||
throw new Failure(hudson.model.Messages.Hudson_NotAPlugin(fileName));
|
||||
}
|
||||
final String baseName = FilenameUtils.getBaseName(fileName);
|
||||
new File(rootDir, baseName + ".hpi").delete(); // don't keep confusing legacy *.hpi
|
||||
fileItem.write(new File(rootDir, baseName + ".jpi")); // rename all new plugins to *.jpi
|
||||
fileItem.delete();
|
||||
|
||||
|
||||
Reference in new issue
Block a user