Skip to content

Commit

Permalink
Check whether the base workdir path exists before trying to remove it.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 700446962
  • Loading branch information
fniksic authored and copybara-github committed Nov 26, 2024
1 parent d4a3183 commit c5dd071
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion centipede/centipede_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,10 @@ int UpdateCorpusDatabaseForFuzzTests(
DeduplicateAndStoreNewCrashes(crashing_dir, workdir, env.total_shards,
std::move(crash_metadata));
}
CHECK_OK(RemotePathDelete(base_workdir_path.c_str(), /*recursively=*/true));
// Path may not exist if there are no fuzz tests in the shard.
if (RemotePathExists(base_workdir_path.c_str())) {
CHECK_OK(RemotePathDelete(base_workdir_path.c_str(), /*recursively=*/true));
}

return EXIT_SUCCESS;
}
Expand Down

0 comments on commit c5dd071

Please sign in to comment.