mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-25 16:38:21 -04:00
A mounted partition cannot be resized or replaced
- add check for isMounted() - a device with a mounted partition cannot be (entirely) erased FIXES #639
This commit is contained in:
parent
851379628c
commit
3e5916157f
2 changed files with 26 additions and 50 deletions
|
@ -45,6 +45,9 @@ canBeReplaced( Partition* candidate )
|
|||
if ( !candidate )
|
||||
return false;
|
||||
|
||||
if ( candidate->isMounted() )
|
||||
return false;
|
||||
|
||||
bool ok = false;
|
||||
double requiredStorageGB = Calamares::JobQueue::instance()
|
||||
->globalStorage()
|
||||
|
@ -83,6 +86,9 @@ canBeResized( Partition* candidate )
|
|||
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
|
||||
return false;
|
||||
|
||||
if ( candidate->isMounted() )
|
||||
return false;
|
||||
|
||||
if ( candidate->roles().has( PartitionRole::Primary ) )
|
||||
{
|
||||
PartitionTable* table = dynamic_cast< PartitionTable* >( candidate->parent() );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue