mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
Disallow replace/resize on free space.
CAL-359 #close
This commit is contained in:
parent
7d5795a6fd
commit
a0055534a1
1 changed files with 6 additions and 0 deletions
|
@ -37,6 +37,9 @@ namespace PartUtils
|
|||
bool
|
||||
canBeReplaced( Partition* candidate )
|
||||
{
|
||||
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
|
||||
return false;
|
||||
|
||||
bool ok = false;
|
||||
double requiredStorageGB = Calamares::JobQueue::instance()
|
||||
->globalStorage()
|
||||
|
@ -68,6 +71,9 @@ canBeResized( Partition* candidate )
|
|||
!candidate->fileSystem().supportShrink() )
|
||||
return false;
|
||||
|
||||
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
|
||||
return false;
|
||||
|
||||
if ( candidate->roles().has( PartitionRole::Primary ) )
|
||||
{
|
||||
PartitionTable* table = dynamic_cast< PartitionTable* >( candidate->parent() );
|
||||
|
|
Loading…
Add table
Reference in a new issue