mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-23 10:25:45 -05:00
[partition] Mount points should start with a /
This commit is contained in:
parent
fbcd1ffbbe
commit
d8be9a9443
2 changed files with 14 additions and 2 deletions
|
@ -325,11 +325,17 @@ CreatePartitionDialog::updateMountPointUi()
|
|||
void
|
||||
CreatePartitionDialog::checkMountPointSelection()
|
||||
{
|
||||
if ( m_usedMountPoints.contains( selectedMountPoint( m_ui->mountPointComboBox ) ) )
|
||||
const QString mountPoint = selectedMountPoint( m_ui->mountPointComboBox );
|
||||
if ( m_usedMountPoints.contains( mountPoint ) )
|
||||
{
|
||||
m_ui->labelMountPoint->setText( tr( "Mountpoint already in use. Please select another one." ) );
|
||||
m_ui->buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
|
||||
}
|
||||
else if ( !mountPoint.isEmpty() && !mountPoint.startsWith( '/' ) )
|
||||
{
|
||||
m_ui->labelMountPoint->setText( tr( "Mountpoint must start with a <pre>/</pre>." ) );
|
||||
m_ui->buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui->labelMountPoint->setText( QString() );
|
||||
|
|
|
@ -295,11 +295,17 @@ EditExistingPartitionDialog::updateMountPointPicker()
|
|||
void
|
||||
EditExistingPartitionDialog::checkMountPointSelection()
|
||||
{
|
||||
if ( m_usedMountPoints.contains( selectedMountPoint( m_ui->mountPointComboBox ) ) )
|
||||
const QString mountPoint = selectedMountPoint( m_ui->mountPointComboBox );
|
||||
if ( m_usedMountPoints.contains( mountPoint ) )
|
||||
{
|
||||
m_ui->labelMountPoint->setText( tr( "Mountpoint already in use. Please select another one." ) );
|
||||
m_ui->buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
|
||||
}
|
||||
else if ( !mountPoint.isEmpty() && !mountPoint.startsWith( '/' ) )
|
||||
{
|
||||
m_ui->labelMountPoint->setText( tr( "Mountpoint must start with a <pre>/</pre>." ) );
|
||||
m_ui->buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui->labelMountPoint->setText( QString() );
|
||||
|
|
Loading…
Add table
Reference in a new issue