tails: fix detect

This commit is contained in:
tobtoht 2024-02-27 19:12:36 +01:00
parent c6737df553
commit df35583cb6
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -23,7 +23,9 @@ bool TailsOS::detect()
QByteArray data = Utils::fileOpen("/etc/os-release");
QRegularExpression re("TAILS_PRODUCT_NAME=\"Tails\"");
QRegularExpressionMatch os_match = re.match(data);
bool matched = os_match.hasMatch();
QRegularExpression re_6("NAME=\"Tails\"");
bool matched = os_match.hasMatch() || re_6.match(data).hasMatch();
if (matched)
qDebug() << "Tails OS detected";