diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -462,6 +462,22 @@ return placesModel->text(matchedPlaces.first()); } + if (url().toString().endsWith("/")) { + //Check places without trailing slash + const auto& matchedPlaces = placesModel->match(placesModel->index(0,0), KFilePlacesModel::UrlRole, url().adjusted(QUrl::StripTrailingSlash), 1, Qt::MatchExactly); + + if (!matchedPlaces.isEmpty()) { + return placesModel->text(matchedPlaces.first()); + } + } else { + //Check places with trailing slash + const auto& matchedPlaces = placesModel->match(placesModel->index(0,0), KFilePlacesModel::UrlRole, QUrl(url().toString().append("/")), 1, Qt::MatchExactly); + + if (!matchedPlaces.isEmpty()) { + return placesModel->text(matchedPlaces.first()); + } + } + if (isSearchModeEnabled()) { if (currentSearchText().isEmpty()){ return i18n("Search");