Ignore unexpected incr-comp session dirs

Clearly the code path can be hit without the presence of a compiler bug.
All it takes is mischief. See 71698.

Ignore problematic directories instead of ICE:ing. `continue`ing is
already done for problematic dirs in the code block above us.
This commit is contained in:
Martin Nordholts 2023-08-18 19:20:28 +02:00
parent df8aed400b
commit 64e8aea9ce

View File

@ -538,9 +538,13 @@ fn find_source_directory_in_iter<I>(
continue;
}
let timestamp = extract_timestamp_from_session_dir(&directory_name).unwrap_or_else(|e| {
bug!("unexpected incr-comp session dir: {}: {}", session_dir.display(), e)
});
let timestamp = match extract_timestamp_from_session_dir(&directory_name) {
Ok(timestamp) => timestamp,
Err(e) => {
debug!("unexpected incr-comp session dir: {}: {}", session_dir.display(), e);
continue;
}
};
if timestamp > best_candidate.0 {
best_candidate = (timestamp, Some(session_dir.clone()));