Disallow replace/resize on free space.
CAL-359 #close
This commit is contained in:
parent
7d5795a6fd
commit
a0055534a1
@ -37,6 +37,9 @@ namespace PartUtils
|
|||||||
bool
|
bool
|
||||||
canBeReplaced( Partition* candidate )
|
canBeReplaced( Partition* candidate )
|
||||||
{
|
{
|
||||||
|
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
double requiredStorageGB = Calamares::JobQueue::instance()
|
double requiredStorageGB = Calamares::JobQueue::instance()
|
||||||
->globalStorage()
|
->globalStorage()
|
||||||
@ -68,6 +71,9 @@ canBeResized( Partition* candidate )
|
|||||||
!candidate->fileSystem().supportShrink() )
|
!candidate->fileSystem().supportShrink() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
if ( candidate->roles().has( PartitionRole::Primary ) )
|
if ( candidate->roles().has( PartitionRole::Primary ) )
|
||||||
{
|
{
|
||||||
PartitionTable* table = dynamic_cast< PartitionTable* >( candidate->parent() );
|
PartitionTable* table = dynamic_cast< PartitionTable* >( candidate->parent() );
|
||||||
|
Loading…
Reference in New Issue
Block a user