sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [sling-org-apache-sling-feature-cpconverter] bosschaert commented on a change in pull request #28: Feature Converter doesn't cleanup after itself
Date Wed, 27 May 2020 18:58:05 GMT

bosschaert commented on a change in pull request #28:
URL: https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/28#discussion_r431371846



##########
File path: src/main/java/org/apache/sling/feature/cpconverter/cli/ShutDownHook.java
##########
@@ -76,4 +82,15 @@ public void run() {
         logger.info("+-----------------------------------------------------+");
     }
 
+    private void cleanUp(){
+        String tmpDir = System.getProperty("java.io.tmpdir");
+        logger.info("Cleaning up tmp directories {}, {}", tmpDir + "sub-content-packages",
tmpDir + "syntethic-content-packages" );
+
+        try {
+            FileUtils.deleteDirectory( new File (tmpDir, "syntethic-content-packages") );
+            FileUtils.deleteDirectory( new File(tmpDir, "sub-content-packages") );
+        } catch (IOException e) {
+            logger.error( "Error Deleting {}, {}", tmpDir + "sub-content-packages", tmpDir
+ "syntethic-content-packages");
+        }

Review comment:
       Ok fair enough. No problem then :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message