Fix second audit findings and restore crash detection dialog
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user