From e2dfb97b0fa95a31dbef7e4dd0b6fb72fa764a3d Mon Sep 17 00:00:00 2001 From: Jakob Buchgraber Date: Wed, 16 May 2018 08:40:10 -0700 Subject: [PATCH] remote: recursively delete incomplete downloaded output directory. Fixes #5047 Closes #5209. PiperOrigin-RevId: 196832678 --- .../devtools/build/lib/remote/AbstractRemoteActionCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();