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



##########
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:
       I would make `"sub-content-packages"` and `"syntethic-content-packages"` 
constants...




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to