loginManager: fix versionCompare function
It's important to compare the version components as integers, not strings, so "10" evaulates as greater than "5" This fixes the login screen in gnome 3.10. https://bugzilla.gnome.org/show_bug.cgi?id=708691
This commit is contained in:
parent
3e99eb10d1
commit
609a31ea46
@ -72,8 +72,10 @@ function versionCompare(required, reference) {
|
|||||||
reference = reference.split('.');
|
reference = reference.split('.');
|
||||||
|
|
||||||
for (let i = 0; i < required.length; i++) {
|
for (let i = 0; i < required.length; i++) {
|
||||||
if (required[i] != reference[i])
|
let requiredInt = parseInt(required[i]);
|
||||||
return required[i] < reference[i];
|
let referenceInt = parseInt(reference[i]);
|
||||||
|
if (requiredInt != referenceInt)
|
||||||
|
return requiredInt < referenceInt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user