Do not clear externally provided workdir in UpdateCorpusDatabase. This is a NFC to FuzzTest since centipede_adaptor guarantees that any provided workdir is empty. It allows syncing a corpus database with an existing workdir, enabling e.g. importing corpus from external source or another corpus database. PiperOrigin-RevId: 983883563
diff --git a/centipede/centipede_interface.cc b/centipede/centipede_interface.cc index e0793d1..44ba0c9 100644 --- a/centipede/centipede_interface.cc +++ b/centipede/centipede_interface.cc
@@ -516,7 +516,7 @@ } } - if (RemotePathExists(env.workdir) && !is_resuming) { + if (!is_workdir_specified && RemotePathExists(env.workdir) && !is_resuming) { // This could be a workdir from a failed run that used a different version // of the binary. We delete it so that we don't have to deal with // the assumptions under which it is safe to reuse an old workdir.