> @@ -41,7 +44,11 @@ public static void deleteRecursively(File file) throws
> IOException {
> }
> }
> if (!file.delete()) {
> - throw new IOException("Could not delete: " + file);
> + // On windows, often the directory does not register as empty right
> away.
> + Uninterruptibles.sleepUninterruptibly(5, TimeUnit.SECONDS);
> + if(!file.delete()) {
> + throw new IOException("Could not delete: " + file);
> + }
How about simply waiting 5s straight away?
```
Uninterruptibles.sleepUninterruptibly(5, TimeUnit.SECONDS);
if (!file.delete()) {
throw new IOException("Could not delete: " + file);
}
```
But also fine as is ;-)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/217/files#r7938272