Get the mountpoint from PartitionInfo.

The Partition object includes the root mountpoint in
the partition mountpoint, which is not what we want.
This commit is contained in:
shainer 2016-11-20 22:46:28 +00:00
parent c8dbeb5341
commit f51b05e8aa

View File

@ -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;
}
}