Always delete logical partitions first when deleting an extended partition
This commit is contained in:
parent
d7a853ee06
commit
0d915b4995
@ -215,10 +215,6 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
|
|||||||
auto deviceInfo = infoForDevice( device );
|
auto deviceInfo = infoForDevice( device );
|
||||||
Q_ASSERT( deviceInfo );
|
Q_ASSERT( deviceInfo );
|
||||||
|
|
||||||
QList< Calamares::job_ptr >& jobs = deviceInfo->jobs;
|
|
||||||
|
|
||||||
if ( partition->state() == Partition::StateNew )
|
|
||||||
{
|
|
||||||
if ( partition->roles().has( PartitionRole::Extended ) )
|
if ( partition->roles().has( PartitionRole::Extended ) )
|
||||||
{
|
{
|
||||||
// Delete all logical partitions first
|
// Delete all logical partitions first
|
||||||
@ -232,6 +228,10 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
|
|||||||
for ( auto partition : lst )
|
for ( auto partition : lst )
|
||||||
deletePartition( device, partition );
|
deletePartition( device, partition );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList< Calamares::job_ptr >& jobs = deviceInfo->jobs;
|
||||||
|
if ( partition->state() == Partition::StateNew )
|
||||||
|
{
|
||||||
// Find matching CreatePartitionJob
|
// Find matching CreatePartitionJob
|
||||||
auto it = std::find_if( jobs.begin(), jobs.end(), [ partition ]( Calamares::job_ptr job )
|
auto it = std::find_if( jobs.begin(), jobs.end(), [ partition ]( Calamares::job_ptr job )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user