fix: keep the platform's hash order when unchanged

Where the truth names no value the platform lacks, hashes() still put
the truth's values first and rewrote the list in another order:
Recalbox's msx/CARTS.SHA md5 attribute came out with its two values
swapped, a diff line that changes nothing the frontend checks. The
platform's own list now stands when it already holds every value.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 20:00:54 +02:00
1 parent 0b4f98ce79
commit 5cba005d67
1 file changed
+5
+5
View File
@@ -163,6 +163,11 @@ class NativeFile:
return platform_values
if not set(truth_values) & set(platform_values):
return truth_values
# Nothing to add: the platform's own order stands. Truth first
# rewrote Recalbox's msx/CARTS.SHA md5 list with the same two values
# swapped, a diff line that changes nothing the frontend checks.
if set(truth_values) <= set(platform_values):
return platform_values
# Keep the platform's extra accepted revisions alongside ours.
return truth_values + [v for v in platform_values if v not in truth_values]