Ignore unallocated partitions in RAID creation

This commit is contained in:
Caio Carvalho 2018-08-09 12:16:34 -03:00
parent a7680ae169
commit 4365a0e9d2
1 changed files with 3 additions and 2 deletions

View File

@ -119,9 +119,10 @@ void CreateVolumeGroupDialog::updatePartitionList()
for (const Device *d : qAsConst(m_Devices)) {
if (d->type() != Device::Type::SoftwareRAID_Device && d->partitionTable() != nullptr) {
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
if (p->fileSystem().type() == FileSystem::Type::LinuxRaidMember ||
if ((p->fileSystem().type() == FileSystem::Type::LinuxRaidMember ||
p->fileSystem().type() == FileSystem::Type::Unformatted ||
p->fileSystem().type() == FileSystem::Type::Unknown)
p->fileSystem().type() == FileSystem::Type::Unknown) &&
!p->roles().has(PartitionRole::Role::Unallocated))
dialogWidget().listPV().addPartition(*p, false);
}
}