mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 01:45:36 -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() )
|
!candidate->fileSystem().supportShrink() )
|
||||||
return false;
|
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;
|
bool ok = false;
|
||||||
double requiredStorageGB = Calamares::JobQueue::instance()
|
double requiredStorageGB = Calamares::JobQueue::instance()
|
||||||
->globalStorage()
|
->globalStorage()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue