diff --git a/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java index 009eddb9913447..1cd1ef99228ac7 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java +++ b/src/main/java/com/google/devtools/build/lib/remote/AbstractRemoteActionCache.java @@ -156,7 +156,7 @@ public void download(ActionResult result, Path execRoot, FileOutErr outErr) execRoot.getRelative(file.getPath()).delete(); } for (OutputDirectory directory : result.getOutputDirectoriesList()) { - execRoot.getRelative(directory.getPath()).delete(); + FileSystemUtils.deleteTree(execRoot.getRelative(directory.getPath())); } if (outErr != null) { outErr.getOutputPath().delete();