You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/05/09 13:36:17 UTC

[sling-org-apache-sling-feature-cpconverter] branch master updated: remove temporary files, once processed

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2ec055c  remove temporary files, once processed
2ec055c is described below

commit 2ec055cb75ab3f0060b60b982a569641bca6469b
Author: stripodi <st...@simos-mbp>
AuthorDate: Thu May 9 15:36:10 2019 +0200

    remove temporary files, once processed
---
 .../feature/cpconverter/handlers/ContentPackageEntryHandler.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/feature/cpconverter/handlers/ContentPackageEntryHandler.java b/src/main/java/org/apache/sling/feature/cpconverter/handlers/ContentPackageEntryHandler.java
index c385e05..c849015 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/handlers/ContentPackageEntryHandler.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/handlers/ContentPackageEntryHandler.java
@@ -43,7 +43,11 @@ public final class ContentPackageEntryHandler extends AbstractRegexEntryHandler
             IOUtils.copy(input, output);
         }
 
-        converter.processSubPackage(path, temporaryContentPackage);
+        try {
+            converter.processSubPackage(path, temporaryContentPackage);
+        } finally {
+            temporaryContentPackage.delete();
+        }
     }
 
 }