Show More
@@ -713,7 +713,17 b' impl DirEntry {' | |||||
713 | let mut results = Vec::new(); |
|
713 | let mut results = Vec::new(); | |
714 | for entry in path.read_dir()? { |
|
714 | for entry in path.read_dir()? { | |
715 | let entry = entry?; |
|
715 | let entry = entry?; | |
716 |
let metadata = entry.metadata() |
|
716 | let metadata = match entry.metadata() { | |
|
717 | Ok(v) => v, | |||
|
718 | Err(e) => { | |||
|
719 | // race with file deletion? | |||
|
720 | if e.kind() == std::io::ErrorKind::NotFound { | |||
|
721 | continue; | |||
|
722 | } else { | |||
|
723 | return Err(e); | |||
|
724 | } | |||
|
725 | } | |||
|
726 | }; | |||
717 | let name = get_bytes_from_os_string(entry.file_name()); |
|
727 | let name = get_bytes_from_os_string(entry.file_name()); | |
718 | // FIXME don't do this when cached |
|
728 | // FIXME don't do this when cached | |
719 | if name == b".hg" { |
|
729 | if name == b".hg" { |
General Comments 0
You need to be logged in to leave comments.
Login now