Version comparison issue when trying to get latest Microsoft Visual Studio Code
Hi!
I'm curently running version 2.10.64 of Neverred and I'm facing an issue, trying to get latest stable version of Microsoft Visual Studio Code.
There actually seems to be some version comparision problems
Installed Version of VSCode is 1.98.2 and the latest stable version available is 1.103.2 which is not recognized as newer version. Without having a look at the code, I'm guessing the comparison is done via String comparison and so 1.9x.x is is mistakenly recognized to be newer than 1.1xx.x.
Regards Benni.
Today i came accross this same issue again.
VS-Code installed was 1.98.2 and latest stable is 1.104.1
Just had a quick look at the code (line14545 ff.) : As already assumed last time, the versions are simply compared as plain strings and so any "1.1xxxxx" is always lower than (-lt) any "1.9xxxxxx" (see also further on in the code where actual download and installation are to be performed)
In this example
"1.98.2" -lt "1.104.1"
will evaluate to False (which is obviously not correct)
The Strings should be converted/casted to "real" comparable versions using [System.Version]
[System.Version]"1.98.2" -lt [System.Version]"1.104.1"
will be correctly evaluated as True
Maybe this should be considererd to change for other applications too.