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)
|
QStringLiteral("reallyWriteMountPoints")) == KMessageBox::Cancel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
widget().acceptChanges();
|
||||||
if (writeMountpoints(widget().fstabEntries()))
|
if (writeMountpoints(widget().fstabEntries()))
|
||||||
partition().setMountPoint(widget().editPath().text());
|
partition().setMountPoint(widget().editPath().text());
|
||||||
else
|
else
|
||||||
|
|
|
@ -51,7 +51,9 @@ EditMountPointDialogWidget::EditMountPointDialogWidget(QWidget* parent, const Pa
|
||||||
|
|
||||||
bool entryFound = false;
|
bool entryFound = false;
|
||||||
for (auto &e : m_fstabEntries) {
|
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;
|
entryFound = true;
|
||||||
entry = &e;
|
entry = &e;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue