-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix version check on preferences upgrade #2232
Conversation
src/preferences/upgrade.cpp
Outdated
configVersion.startsWith("2.1.0")) { | ||
// No special upgrade required, just update the value. | ||
else { | ||
// Vesrion seems to be never or equal v"1.12" so, no special upgrade required, just update the value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo and wording
The common else branch is also wrong, because it will silently downgrade to a lower version. I mentioned in my bug report that this case needs to be handled properly. It involves parsing the first 2 or 3 digits (major, minor, patch) from the version number string. You also need to consider pre-releases that might have an arbitrary suffix, so the parse must be kind of lazy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A Regex should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete
Why is this targeted at 2.1? We are no longer maintaining 2.1. I think this should go to the 2.2 branch. |
to be honest, I do no longer work active on this, someone else might take this over to finish |
I'll close this PR. Please feel free to open a new PR when ready again. |
follow up for #2231 but this time against branch 2.1