From 469855f7f74e2a0ef10de21cc1bdd8de0aea845f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 4 Feb 2018 15:21:58 +0000 Subject: [PATCH 1/2] Add missing variables to Partition class copy constructor. --- src/core/partition.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/partition.cpp b/src/core/partition.cpp index 5b7c3a0..7ca7d70 100644 --- a/src/core/partition.cpp +++ b/src/core/partition.cpp @@ -99,6 +99,8 @@ Partition::Partition(const Partition& other, PartitionNode* parent) : m_FirstSector(other.m_FirstSector), m_LastSector(other.m_LastSector), m_DevicePath(other.m_DevicePath), + m_Label(other.m_Label), + m_UUID(other.m_UUID), m_MountPoint(other.m_MountPoint), m_AvailableFlags(other.m_AvailableFlags), m_ActiveFlags(other.m_ActiveFlags), @@ -136,6 +138,8 @@ Partition& Partition::operator=(const Partition& other) m_FirstSector = other.m_FirstSector; m_LastSector = other.m_LastSector; m_DevicePath = other.m_DevicePath; + m_Label = other.m_Label; + m_UUID = other.m_UUID; m_PartitionPath = other.m_PartitionPath; m_MountPoint = other.m_MountPoint; m_AvailableFlags = other.m_AvailableFlags; From dcc9875923053542dd26ae70b965173d943ca121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 4 Feb 2018 15:56:30 +0000 Subject: [PATCH 2/2] Fix regular expression used in readLabel and readUUID. --- src/plugins/sfdisk/sfdiskbackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/sfdisk/sfdiskbackend.cpp b/src/plugins/sfdisk/sfdiskbackend.cpp index 6571bec..57a510d 100644 --- a/src/plugins/sfdisk/sfdiskbackend.cpp +++ b/src/plugins/sfdisk/sfdiskbackend.cpp @@ -365,7 +365,7 @@ QString SfdiskBackend::readLabel(const QString& deviceNode) const QStringLiteral("--query=property"), deviceNode }); udevCommand.run(); - QRegularExpression re(QStringLiteral("ID_FS_LABEL=(\\w+)")); + QRegularExpression re(QStringLiteral("ID_FS_LABEL=(.*)")); QRegularExpressionMatch reFileSystemLabel = re.match(udevCommand.output()); if (reFileSystemLabel.hasMatch()) return reFileSystemLabel.captured(1); @@ -380,7 +380,7 @@ QString SfdiskBackend::readUUID(const QString& deviceNode) const QStringLiteral("--query=property"), deviceNode }); udevCommand.run(); - QRegularExpression re(QStringLiteral("ID_FS_UUID=(\\w+)")); + QRegularExpression re(QStringLiteral("ID_FS_UUID=(.*)")); QRegularExpressionMatch reFileSystemUUID = re.match(udevCommand.output()); if (reFileSystemUUID.hasMatch()) return reFileSystemUUID.captured(1);