Fix second audit findings and restore crash detection dialog

This commit is contained in:
2026-02-27 22:48:43 +02:00
parent df8606251f
commit 1da69dd44e
21 changed files with 228 additions and 181 deletions

View File

@@ -329,6 +329,8 @@ fn build_name_group(name: &str, records: &[&AppImageRecord]) -> DuplicateGroup {
}
/// Compare two version strings for ordering.
/// Falls back to lexicographic comparison of cleaned versions to guarantee
/// the total ordering contract (antisymmetry) required by sort_by.
fn compare_versions(a: &str, b: &str) -> std::cmp::Ordering {
use super::updater::{clean_version, version_is_newer};
@@ -339,8 +341,11 @@ fn compare_versions(a: &str, b: &str) -> std::cmp::Ordering {
std::cmp::Ordering::Equal
} else if version_is_newer(a, b) {
std::cmp::Ordering::Greater
} else {
} else if version_is_newer(b, a) {
std::cmp::Ordering::Less
} else {
// Neither is newer (unparseable components) - use lexicographic fallback
ca.cmp(&cb)
}
}