> @@ -38,8 +43,18 @@ public static void deleteRecursively(File file) throws
> IOException {
> }
> }
> }
> - if (!file.delete()) {
> - throw new IOException("Could not delete: " + file);
> +
> + /**
> + * Java-6 Compatible version of handling non-empty directories and
> access-denied on windows.
> + */
> + if(!file.delete()){
> + if(file.isDirectory() && file.listFiles().length > 0) {
I'm guessing there's no cheaper way to determine if a directory is non-empty?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/454/files#r15473617