Commit 068b6297 authored by Emmanuel Pescosta's avatar Emmanuel Pescosta

Fixes Bug 304878 - Dolphin shows "ghost" folders in places after autofs umount nfs shares

BUG: 304878
REVIEW: 106456
FIXED-IN: 4.9.2
parent f52fc142
......@@ -659,11 +659,22 @@ void PlacesItemModel::updateBookmarks()
}
if (!found) {
PlacesItem* item = new PlacesItem(newBookmark);
if (item->isHidden() && !m_hiddenItemsShown) {
m_bookmarkedItems.append(item);
} else {
appendItemToGroup(item);
const QString udi = newBookmark.metaDataItem("UDI");
/*
* See Bug 304878
* Only add a new places item, if the item text is not empty
* and if the device is available. Fixes the strange behaviour -
* add a places item without text in the Places section - when you
* remove a device (e.g. a usb stick) without unmounting.
*/
if (udi.isEmpty() || Solid::Device(udi).isValid()) {
PlacesItem* item = new PlacesItem(newBookmark);
if (item->isHidden() && !m_hiddenItemsShown) {
m_bookmarkedItems.append(item);
} else {
appendItemToGroup(item);
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment