Disallow replace/resize on free space.

CAL-359 #close
This commit is contained in:
Teo Mrnjavac 2016-03-10 12:54:16 +01:00
parent 7d5795a6fd
commit a0055534a1

View file

@ -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() );