incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1378456 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/EntityResourceList.java
Date Wed, 29 Aug 2012 06:44:23 GMT
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 {



Mime
View raw message