From 8c126cdf7e5cda1937017b2ea3545d09d7978fbc Mon Sep 17 00:00:00 2001 From: tooomm Date: Fri, 17 Jul 2026 17:08:26 +0200 Subject: [PATCH] update regex --- .../src/client/network/update/client/release_channel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/client/network/update/client/release_channel.cpp b/cockatrice/src/client/network/update/client/release_channel.cpp index beba05c7d..af802a3d2 100644 --- a/cockatrice/src/client/network/update/client/release_channel.cpp +++ b/cockatrice/src/client/network/update/client/release_channel.cpp @@ -60,13 +60,14 @@ std::optional ReleaseChannel::getTargetVersionForCurrentOS(const QString &f } return false; }(); - static const QRegularExpression macIntelRegex(R"(macOS(\d+)_Intel\.[^.]+$)", + static const QRegularExpression macIntelRegex(R"(-macOS(\d+)_Intel\.[^.]+$)", QRegularExpression::CaseInsensitiveOption); - static const QRegularExpression macArmRegex(R"(macOS(\d+)\.[^.]+$)", QRegularExpression::CaseInsensitiveOption); + static const QRegularExpression macArmRegex(R"(-macOS(\d+)\.[^.]+$)", QRegularExpression::CaseInsensitiveOption); regex = isIntel ? &macIntelRegex : &macArmRegex; #elif defined(Q_OS_WIN) - static const QRegularExpression winRegex(R"(Win(?:dows)?(\d+)\.[^.]+$)", QRegularExpression::CaseInsensitiveOption); + static const QRegularExpression winRegex(R"(-(?:Win|Windows)(\d+)\.[^.]+$)", + QRegularExpression::CaseInsensitiveOption); regex = &winRegex; #else // if the OS doesn't fit one of the above #defines, then it will never match