agentsd: collapse the scan predicate
This commit is contained in:
parent
d739f3597d
commit
e7929e41ca
1 changed files with 4 additions and 4 deletions
|
|
@ -463,12 +463,12 @@ fn recent_jsonl(root: &Path, depth: usize, out: &mut Vec<PathBuf>) {
|
|||
let Ok(meta) = e.metadata() else { continue };
|
||||
if meta.is_dir() {
|
||||
recent_jsonl(&path, depth - 1, out);
|
||||
} else if path.extension().and_then(|x| x.to_str()) == Some("jsonl") {
|
||||
if meta.modified().map(|m| m >= cutoff).unwrap_or(false) {
|
||||
} else if path.extension().and_then(|x| x.to_str()) == Some("jsonl")
|
||||
&& meta.modified().map(|m| m >= cutoff).unwrap_or(false)
|
||||
{
|
||||
out.push(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn stem(p: &Path) -> String {
|
||||
|
|
|
|||
Loading…
Reference in a new issue