From f51b05e8aa64cee3666224f758018fa1f0513faf Mon Sep 17 00:00:00 2001 From: shainer Date: Sun, 20 Nov 2016 22:46:28 +0000 Subject: [PATCH] Get the mountpoint from PartitionInfo. The Partition object includes the root mountpoint in the partition mountpoint, which is not what we want. --- src/modules/partition/gui/PartitionPage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index 99dd1679b..438d89b3d 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -23,6 +23,7 @@ #include "core/BootLoaderModel.h" #include "core/DeviceModel.h" #include "core/PartitionCoreModule.h" +#include "core/PartitionInfo.h" #include "core/PartitionModel.h" #include "core/KPMHelpers.h" #include "gui/CreatePartitionDialog.h" @@ -387,8 +388,10 @@ PartitionPage::getCurrentUsedMountpoints() QStringList mountPoints; for (Partition* partition : device->partitionTable()->children()) { - if (!partition->mountPoint().isEmpty()) { - mountPoints << partition->mountPoint(); + const QString& mountPoint = PartitionInfo::mountPoint( partition ); + + if (!mountPoint.isEmpty()) { + mountPoints << mountPoint; } }