Skip to content

Commit

Permalink
LDEV-4763 - add possibility to remove extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 8, 2023
1 parent 153e5fc commit 16ed5cf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/main/java/lucee/runtime/tag/Admin.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import lucee.commons.lang.ExceptionUtil;
import lucee.commons.lang.IDGenerator;
import lucee.commons.lang.StringUtil;
import lucee.commons.lang.types.RefBooleanImpl;
import lucee.commons.surveillance.HeapDumper;
import lucee.loader.engine.CFMLEngine;
import lucee.loader.osgi.BundleCollection;
Expand Down Expand Up @@ -4289,7 +4290,8 @@ private void doUpdateRHExtension(boolean throwOnError) throws PageException {
String version = getString("version", null);
if (!StringUtil.isEmpty(version, true) && !"latest".equalsIgnoreCase(version)) ed = new ExtensionDefintion(id, version);
else ed = RHExtension.toExtensionDefinition(id);
DeployHandler.deployExtension(config, ed, config == null ? null : ThreadLocalPageContext.getLog(pageContext, "application"), true, true, throwOnError);
DeployHandler.deployExtension(config, ed, config == null ? null : ThreadLocalPageContext.getLog(pageContext, "application"), true, true, throwOnError,
new RefBooleanImpl());
return;
}

Expand All @@ -4315,13 +4317,13 @@ private void doUpdateRHExtension(boolean throwOnError) throws PageException {
// path
if (obj instanceof String) {
Resource src = ResourceUtil.toResourceExisting(config, (String) obj);
ConfigAdmin._updateRHExtension(config, src, true, true, true);
ConfigAdmin._updateRHExtension(config, src, true, true, RHExtension.ACTION_MOVE);
}
else {
try {
Resource tmp = SystemUtil.getTempFile("lex", true);
IOUtil.copy(new ByteArrayInputStream(Caster.toBinary(obj)), tmp, true);
ConfigAdmin._updateRHExtension(config, tmp, true, true, true);
ConfigAdmin._updateRHExtension(config, tmp, true, true, RHExtension.ACTION_MOVE);
}
catch (IOException ioe) {
throw Caster.toPageException(ioe);
Expand Down

0 comments on commit 16ed5cf

Please sign in to comment.