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:
YeonGyu-Kim
2026-04-02 14:50:23 +09:00
parent 920842fffe
commit 86bc510722
+6 -1
View File
@@ -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<_>>();