[java-identity-provider] branch main updated: IDP-1774 - Uninstalling module should remove .idpnew files
Scott Cantor
cantor.2 at osu.edu
Fri Mar 12 16:34:18 UTC 2021
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=c7971a5711f97135928b51289d12f42554e80aa8
The following commit(s) were added to refs/heads/main by this push:
new c7971a571 IDP-1774 - Uninstalling module should remove .idpnew files
c7971a571 is described below
commit c7971a5711f97135928b51289d12f42554e80aa8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Mar 12 11:33:15 2021 -0500
IDP-1774 - Uninstalling module should remove .idpnew files
https://issues.shibboleth.net/jira/browse/IDP-1774
Just remove idpnew copies regardless when disabling.
---
.../java/net/shibboleth/idp/module/AbstractIdPModule.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java b/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java
index 81ede5481..fd7cc49c7 100644
--- a/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java
+++ b/idp-admin-api/src/main/java/net/shibboleth/idp/module/AbstractIdPModule.java
@@ -482,20 +482,16 @@ public abstract class AbstractIdPModule implements IdPModule {
log.debug("Module {} removing resource {}", getId(), resolved);
Files.delete(resolved);
result = ResourceResult.REMOVED;
-
- // If cleaning check for a previous distribution copy to remove.
- if (clean) {
- final Path idpnewVersion = resolved.resolveSibling(resolved.getFileName() + ".idpnew");
- if (Files.exists(idpnewVersion)) {
- Files.delete(idpnewVersion);
- }
- }
} else {
log.debug("Module {} backing up resource {}", getId(), resolved);
Files.move(resolved, resolved.resolveSibling(resolved.getFileName() + ".idpsave"),
StandardCopyOption.REPLACE_EXISTING);
result = ResourceResult.SAVED;
}
+ final Path idpnewVersion = resolved.resolveSibling(resolved.getFileName() + ".idpnew");
+ if (Files.exists(idpnewVersion)) {
+ Files.delete(idpnewVersion);
+ }
} catch (final IOException e) {
log.error("Module {} failed to disable {}", getId(), resolved);
throw new ModuleException(e);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list