Check whether a new primary partition can be created in canBeResized.

This commit is contained in:
Teo Mrnjavac 2016-02-12 16:36:50 +01:00
parent c3404769dc
commit a9c6b47e5e

View File

@ -68,6 +68,16 @@ canBeResized( Partition* candidate )
!candidate->fileSystem().supportShrink() )
return false;
if ( candidate->roles().has( PartitionRole::Primary ) )
{
PartitionTable* table = dynamic_cast< PartitionTable* >( candidate->parent() );
if ( !table )
return false;
if ( table->numPrimaries() >= table->maxPrimaries() )
return false;
}
bool ok = false;
double requiredStorageGB = Calamares::JobQueue::instance()
->globalStorage()