fix(runtime): use path extension matching for rotated logs
Resolves clippy::case_sensitive_file_extension_comparisons in session.rs. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
920842fffe
commit
86bc510722
1 changed files with 6 additions and 1 deletions
|
|
@ -879,7 +879,12 @@ fn cleanup_rotated_logs(path: &Path) -> Result<(), SessionError> {
|
|||
entry_path
|
||||
.file_name()
|
||||
.and_then(|value| value.to_str())
|
||||
.is_some_and(|name| name.starts_with(&prefix) && name.ends_with(".jsonl"))
|
||||
.is_some_and(|name| {
|
||||
name.starts_with(&prefix)
|
||||
&& Path::new(name)
|
||||
.extension()
|
||||
.is_some_and(|ext| ext.eq_ignore_ascii_case("jsonl"))
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue