mirror of
https://github.com/ultraworkers/claw-code-parity.git
synced 2026-04-23 21:26:03 +02:00
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:
@@ -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<_>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user