mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
fix version parser in updater
This commit is contained in:
parent
a11a47113e
commit
42bbbe8005
@ -2366,6 +2366,13 @@ void MainWindow::ResetAssets(const QString& geoipUrl, const QString& geositeUrl)
|
||||
bool isNewer(QString version) {
|
||||
if (QString(NKR_VERSION).isEmpty()) return false;
|
||||
version = version.mid(7); // take out Throne-
|
||||
if (version.mid(version.indexOf("-")+1).startsWith("alpha") || version.mid(version.indexOf("-")+1).startsWith("beta") || version.mid(version.indexOf("-")+1).startsWith("rc"))
|
||||
{
|
||||
version = version.replace(".zip", "");
|
||||
} else
|
||||
{
|
||||
version = version.left(version.indexOf("-"));
|
||||
}
|
||||
auto parts = version.replace("-", ".").split('.');
|
||||
auto currentParts = QString(NKR_VERSION).replace("-", ".").split('.');
|
||||
if (parts.size() < 3 || currentParts.size() < 3)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user