You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2012/08/29 08:44:23 UTC
svn commit: r1378456 -
/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java
Author: cziegeler
Date: Wed Aug 29 06:44:23 2012
New Revision: 1378456
URL: http://svn.apache.org/viewvc?rev=1378456&view=rev
Log:
SLING-2587 : Same artifact with different digest leads to stale files
Modified:
sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java
Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java?rev=1378456&r1=1378455&r2=1378456&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java (original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java Wed Aug 29 06:44:23 2012
@@ -277,6 +277,11 @@ public class EntityResourceList implemen
final TaskResource rr = taskIter.next();
if ( rr.getURL().equals(r.getURL()) ) {
if ( RegisteredResourceImpl.isSameResource((RegisteredResourceImpl)rr, (RegisteredResourceImpl)r) ) {
+ if ( !rr.getDigest().equals(r.getDigest()) ) {
+ // same resource but different digest, we need to remove the file
+ LOGGER.debug("Cleanup duplicate resource: {}", r);
+ this.cleanup(r);
+ }
// same resource, just ignore the new one
add = false;
} else {