mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 17:35:37 -04:00
[partition] Newly-created (fresh) partitions don't have flags yet
When a partition is set as "freshly created", the dialog was passing in newFlags() as the **already-active** flags on the partition; then the caller was setting those same flags as "set these in the future", so that afterwards, no flags would actually be set (because they're already active -- see the first sentence). Now, fresh partitions have no flags.
This commit is contained in:
parent
f06766085a
commit
dbfd8bea03
1 changed files with 6 additions and 2 deletions
|
@ -204,17 +204,21 @@ CreatePartitionDialog::getNewlyCreatedPartition()
|
|||
: FileSystem::typeForName( m_ui->fsComboBox->currentText() );
|
||||
const QString fsLabel = m_ui->filesystemLabelEdit->text();
|
||||
|
||||
// The newly-created partitions have no flags set (no **active** flags),
|
||||
// because they're new. The desired flags can be retrieved from
|
||||
// newFlags() and the consumer (see PartitionPage::onCreateClicked)
|
||||
// does so, to set up the partition for create-and-then-set-flags.
|
||||
Partition* partition = nullptr;
|
||||
QString luksPassphrase = m_ui->encryptWidget->passphrase();
|
||||
if ( m_ui->encryptWidget->state() == EncryptWidget::Encryption::Confirmed && !luksPassphrase.isEmpty() )
|
||||
{
|
||||
partition = KPMHelpers::createNewEncryptedPartition(
|
||||
m_parent, *m_device, m_role, fsType, fsLabel, first, last, luksPassphrase, newFlags() );
|
||||
m_parent, *m_device, m_role, fsType, fsLabel, first, last, luksPassphrase, PartitionTable::Flags() );
|
||||
}
|
||||
else
|
||||
{
|
||||
partition
|
||||
= KPMHelpers::createNewPartition( m_parent, *m_device, m_role, fsType, fsLabel, first, last, newFlags() );
|
||||
= KPMHelpers::createNewPartition( m_parent, *m_device, m_role, fsType, fsLabel, first, last, PartitionTable::Flags() );
|
||||
}
|
||||
|
||||
if ( m_device->type() == Device::Type::LVM_Device )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue