Don't enable unmounting for extended partitions if a child partition is
mounted. Don't silently succeed when unmounting a partition that cannot in fact be unmounted because it has no mount points. svn path=/trunk/playground/sysadmin/partitionmanager/; revision=866824
This commit is contained in:
parent
2084e004c4
commit
ee08938cea
|
@ -270,7 +270,7 @@ bool Partition::canMount() const
|
|||
/** @return true if this Partition can be unmounted */
|
||||
bool Partition::canUnmount() const
|
||||
{
|
||||
return isMounted();
|
||||
return !roles().has(PartitionRole::Extended) && isMounted();
|
||||
}
|
||||
|
||||
/** Tries to mount a Partition.
|
||||
|
@ -305,7 +305,7 @@ bool Partition::mount()
|
|||
*/
|
||||
bool Partition::unmount()
|
||||
{
|
||||
if (!isMounted())
|
||||
if (!isMounted() || mountPoints().size() == 0)
|
||||
return false;
|
||||
|
||||
bool success = true;
|
||||
|
|
Loading…
Reference in New Issue