diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java b/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java index 810fa7c5b33f95..827a3357a6d389 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java +++ b/src/main/java/com/google/devtools/build/lib/actions/cache/CompactPersistentActionCache.java @@ -270,6 +270,9 @@ private static CompactPersistentActionCache create( *
Backported from https://github.com/bazelbuild/bazel/pull/27525 (Bazel 9.0.0).
*/
private static void deleteUnrecognizedFiles(Path cacheRoot) throws IOException {
+ if (!cacheRoot.exists()) {
+ return;
+ }
Path indexFile = cacheRoot.getChild("filename_index_v" + VERSION + ".blaze");
Path indexJournalFile = cacheRoot.getChild("filename_index_v" + VERSION + ".journal");
ImmutableSet