[partition] Checking if there is LUKS creation support and if partition is not Extended before enabling encryption in CreatePartitionDialog.

This commit is contained in:
Caio Carvalho 2018-05-08 01:30:41 -03:00 committed by Philip
parent 3026b04f44
commit 311f13d479

View File

@ -261,7 +261,9 @@ CreatePartitionDialog::updateMountPointUi()
FileSystem::Type type = FileSystem::typeForName( m_ui->fsComboBox->currentText() );
enabled = !s_unmountableFS.contains( type );
if ( FS::luks::canEncryptType( type ) )
if ( FileSystemFactory::map()[FileSystem::Type::Luks]->supportCreate() &&
FS::luks::canEncryptType( type ) &&
!m_role.has( PartitionRole::Extended ) )
{
m_ui->encryptWidget->show();
m_ui->encryptWidget->reset();