Use canonical device paths when comparing them.

This commit is contained in:
Andrius Štikonas 2017-09-20 21:22:32 +01:00
parent 9407c1ede4
commit cf14bdcac8
2 changed files with 4 additions and 1 deletions

View File

@ -72,6 +72,7 @@ void EditMountPointDialog::accept()
QStringLiteral("reallyWriteMountPoints")) == KMessageBox::Cancel)
return;
widget().acceptChanges();
if (writeMountpoints(widget().fstabEntries()))
partition().setMountPoint(widget().editPath().text());
else

View File

@ -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;
}