fixed a bug with incorrect port detection when clicking the "scan installed containers" button

This commit is contained in:
vladimir.kuznetsov 2023-03-16 16:47:26 +03:00
parent 433e6901c6
commit a92f1b82d0

View file

@ -917,7 +917,7 @@ ErrorCode ServerController::getAlreadyInstalledContainers(const ServerCredential
if (containerInfo.isEmpty()) { if (containerInfo.isEmpty()) {
continue; continue;
} }
const static QRegularExpression containerAndPortRegExp("(amnezia[-a-z]*).*?>([0-9]*)/(udp|tcp).*"); const static QRegularExpression containerAndPortRegExp("(amnezia[-a-z]*).*?:([0-9]*)->[0-9]*/(udp|tcp).*");
QRegularExpressionMatch containerAndPortMatch = containerAndPortRegExp.match(containerInfo); QRegularExpressionMatch containerAndPortMatch = containerAndPortRegExp.match(containerInfo);
if (containerAndPortMatch.hasMatch()) { if (containerAndPortMatch.hasMatch()) {
QString name = containerAndPortMatch.captured(1); QString name = containerAndPortMatch.captured(1);