[java-identity-provider] branch main updated: IDP-1774 - Clean module removal should remove .idpnew files
Scott Cantor
cantor.2 at osu.edu
Thu Mar 11 20:55: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=1a9ad8bd2304f53cbe63d8cf21e6feca0263cbf3
The following commit(s) were added to refs/heads/main by this push:
new 1a9ad8bd2 IDP-1774 - Clean module removal should remove .idpnew files
1a9ad8bd2 is described below
commit 1a9ad8bd2304f53cbe63d8cf21e6feca0263cbf3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Mar 11 15:55:14 2021 -0500
IDP-1774 - Clean module removal should remove .idpnew files
https://issues.shibboleth.net/jira/browse/IDP-1774
---
.../main/java/net/shibboleth/idp/module/AbstractIdPModule.java | 8 ++++++++
1 file changed, 8 insertions(+)
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 0c9ae78f6..81ede5481 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,6 +482,14 @@ 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"),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list