Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/dirstate_tree/status.rs @ 48794:834c938227c6
branching: merge stable into default
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Fri, 18 Feb 2022 11:37:08 +0100 |
parents | 94e36b230990 dcec16e799dd |
children | e2f8ed37201c |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/status.rs Thu Feb 17 07:34:49 2022 +0100 +++ b/rust/hg-core/src/dirstate_tree/status.rs Fri Feb 18 11:37:08 2022 +0100 @@ -778,7 +778,17 @@ let mut results = Vec::new(); for entry in read_dir_path.read_dir()? { let entry = entry?; - let metadata = entry.metadata()?; + let metadata = match entry.metadata() { + Ok(v) => v, + Err(e) => { + // race with file deletion? + if e.kind() == std::io::ErrorKind::NotFound { + continue; + } else { + return Err(e); + } + } + }; let file_name = entry.file_name(); // FIXME don't do this when cached if file_name == ".hg" {