Use canonical device paths when comparing them.
This commit is contained in:
parent
9407c1ede4
commit
cf14bdcac8
|
@ -72,6 +72,7 @@ void EditMountPointDialog::accept()
|
|||
QStringLiteral("reallyWriteMountPoints")) == KMessageBox::Cancel)
|
||||
return;
|
||||
|
||||
widget().acceptChanges();
|
||||
if (writeMountpoints(widget().fstabEntries()))
|
||||
partition().setMountPoint(widget().editPath().text());
|
||||
else
|
||||
|
|
|
@ -51,7 +51,9 @@ EditMountPointDialogWidget::EditMountPointDialogWidget(QWidget* parent, const Pa
|
|||
|
||||
bool entryFound = false;
|
||||
for (auto &e : m_fstabEntries) {
|
||||
if (e.deviceNode() == m_deviceNode) { // FIXME kernel paths, fix multiple mountpoints
|
||||
QString canonicalEntryPath = QFileInfo(e.deviceNode()).canonicalFilePath();
|
||||
QString canonicalDevicePath = QFileInfo(m_deviceNode).canonicalFilePath();
|
||||
if (canonicalEntryPath == canonicalDevicePath) { // FIXME fix multiple mountpoints
|
||||
entryFound = true;
|
||||
entry = &e;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue