mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 08:58:22 -04:00
Check whether a new primary partition can be created in canBeResized.
This commit is contained in:
parent
c3404769dc
commit
a9c6b47e5e
1 changed files with 10 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue