Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

nit: backfill stronger (#10738)

jif-oaiaa46b5cf9932
diff --git a/codex-rs/core/src/rollout/metadata.rs b/codex-rs/core/src/rollout/metadata.rs
index 42e52f78d6..ec11ca3249 100644
--- a/codex-rs/core/src/rollout/metadata.rs
+++ b/codex-rs/core/src/rollout/metadata.rs
@@ -276,9 +276,28 @@ async fn collect_rollout_paths(root: &Path) -> std::io::Result<Vec<PathBuf>> {
continue;
}
};
- while let Some(entry) = read_dir.next_entry().await? {
+ loop {
+ let next_entry = match read_dir.next_entry().await {
+ Ok(next_entry) => next_entry,
+ Err(err) => {
+ warn!(
+ "failed to read directory entry under {}: {err}",
+ dir.display()
+ );
+ continue;
+ }
+ };
+ let Some(entry) = next_entry else {
+ break;
+ };
let path = entry.path();
- let file_type = entry.file_type().await?;
+ let file_type = match entry.file_type().await {
+ Ok(file_type) => file_type,
+ Err(err) => {
+ warn!("failed to read file type for {}: {err}", path.display());
+ continue;
+ }
+ };
if file_type.is_dir() {
stack.push(path);
continue;