Fix regular expression used in readLabel and readUUID.
This commit is contained in:
parent
469855f7f7
commit
dcc9875923
|
@ -365,7 +365,7 @@ QString SfdiskBackend::readLabel(const QString& deviceNode) const
|
||||||
QStringLiteral("--query=property"),
|
QStringLiteral("--query=property"),
|
||||||
deviceNode });
|
deviceNode });
|
||||||
udevCommand.run();
|
udevCommand.run();
|
||||||
QRegularExpression re(QStringLiteral("ID_FS_LABEL=(\\w+)"));
|
QRegularExpression re(QStringLiteral("ID_FS_LABEL=(.*)"));
|
||||||
QRegularExpressionMatch reFileSystemLabel = re.match(udevCommand.output());
|
QRegularExpressionMatch reFileSystemLabel = re.match(udevCommand.output());
|
||||||
if (reFileSystemLabel.hasMatch())
|
if (reFileSystemLabel.hasMatch())
|
||||||
return reFileSystemLabel.captured(1);
|
return reFileSystemLabel.captured(1);
|
||||||
|
@ -380,7 +380,7 @@ QString SfdiskBackend::readUUID(const QString& deviceNode) const
|
||||||
QStringLiteral("--query=property"),
|
QStringLiteral("--query=property"),
|
||||||
deviceNode });
|
deviceNode });
|
||||||
udevCommand.run();
|
udevCommand.run();
|
||||||
QRegularExpression re(QStringLiteral("ID_FS_UUID=(\\w+)"));
|
QRegularExpression re(QStringLiteral("ID_FS_UUID=(.*)"));
|
||||||
QRegularExpressionMatch reFileSystemUUID = re.match(udevCommand.output());
|
QRegularExpressionMatch reFileSystemUUID = re.match(udevCommand.output());
|
||||||
if (reFileSystemUUID.hasMatch())
|
if (reFileSystemUUID.hasMatch())
|
||||||
return reFileSystemUUID.captured(1);
|
return reFileSystemUUID.captured(1);
|
||||||
|
|
Loading…
Reference in New Issue