You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2019/02/01 16:57:02 UTC

[sling-org-apache-sling-feature-extension-content] 28/46: SLING-8105 - checking for filelenght to skip truncated files and allow detection and ignoring of already registered

This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-extension-content.git

commit 9eecc6d2137c8cafa70edcfd3faa839ed4412f4e
Author: Dominik Suess <su...@adobe.com>
AuthorDate: Tue Nov 13 23:07:03 2018 +0100

    SLING-8105 - checking for filelenght to skip truncated files and allow detection and ignoring of already registered
---
 .../java/org/apache/sling/feature/extension/content/ContentHandler.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
index 8986d41..bb45a4b 100644
--- a/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
+++ b/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java
@@ -57,7 +57,7 @@ public class ContentHandler implements ExtensionHandler {
 
         for (final Artifact a : artifacts) {
             final File file = prepareContext.getArtifactFile(a.getId());
-            if (file.exists()) {
+            if (file.exists() && file.length() > 0) {
                 packageReferences.add(file);
             }