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-analyser] karlpauls commented on issue #16: SLING-8251 - Support checking dependencies for content packages
Date Thu, 13 Jun 2019 12:47:15 GMT
karlpauls commented on issue #16: SLING-8251 - Support checking dependencies for content packages
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/16#issuecomment-501687686
 
 
   @simonetripodi, that is problematic as deleteOnExit is not going to delete dirs if they
are not empty. I was more thinking about not removing the try/finally but rather change the
deleteRecursive to look like:
   
   ```
   private void deleteOnExitRecursive(File file) {
   	        if (file.isDirectory()) {
   	            File[] childs = file.listFiles();
   	            if (childs != null) {
   	                for (File child : childs) {
   	                    deleteRecursive(child);
   	                }
   	            }
   	        }
                   file.deleteOnExit();
   }
   ```

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message