From aa46b5cf99327a84c0533527eecd3766beb9fccd Mon Sep 17 00:00:00 2001 From: jif-oai Date: Thu, 5 Feb 2026 12:30:16 +0000 Subject: [PATCH] nit: backfill stronger (#10738) --- codex-rs/core/src/rollout/metadata.rs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/rollout/metadata.rs b/codex-rs/core/src/rollout/metadata.rs index 42e52f78d..ec11ca324 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> { 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;