mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
[partition] Fixing revert device loop error in PartitionCoreModule::revertAllDevices.
This commit is contained in:
parent
0465cc4214
commit
3b6c764f75
1 changed files with 5 additions and 7 deletions
|
@ -683,7 +683,7 @@ PartitionCoreModule::revertAllDevices()
|
|||
for ( auto it = m_deviceInfos.begin(); it != m_deviceInfos.end(); )
|
||||
{
|
||||
// In new VGs device info, there will be always a CreateVolumeGroupJob as the first job in jobs list
|
||||
if ( !( *it )->jobs.empty() )
|
||||
if ( dynamic_cast<LvmDevice*>( ( *it )->device.data() ) && !( *it )->jobs.empty() )
|
||||
{
|
||||
CreateVolumeGroupJob* vgJob = dynamic_cast<CreateVolumeGroupJob*>( ( *it )->jobs[0].data() );
|
||||
|
||||
|
@ -697,14 +697,12 @@ PartitionCoreModule::revertAllDevices()
|
|||
|
||||
it = m_deviceInfos.erase( it );
|
||||
|
||||
scanForLVMPVs();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
revertDevice( ( *it )->device.data() );
|
||||
++it;
|
||||
}
|
||||
|
||||
revertDevice( ( *it )->device.data() );
|
||||
++it;
|
||||
}
|
||||
|
||||
refresh();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue