[system/kio-snapshot] kioworker: kioworker/filesnapshots: make breadcrumbs shorter

Bharadwaj Raju <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit e982b55dfe436cb4a3a6d9d66fc93cafd0a72706 by Bharadwaj Raju.
Committed on 09/08/2026 at 19:31.
Pushed by bharadwaj-raju into branch 'master'.

kioworker/filesnapshots: make breadcrumbs shorter

M  +6    -2    kioworker/filesnapshots.cpp

https://invent.kde.org/system/kio-snapshot/-/commit/e982b55dfe436cb4a3a6d9d66fc93cafd0a72706

diff --git a/kioworker/filesnapshots.cpp b/kioworker/filesnapshots.cpp
index e6c8d1c..34f09a5 100644
--- a/kioworker/filesnapshots.cpp
+++ b/kioworker/filesnapshots.cpp
@@ -221,8 +221,12 @@ KIO::WorkerResult FileSnapshotsProtocol::stat(const QUrl &url)
         KIO::UDSEntry uds;
         uds.reserve(6);
         uds.fastInsert(KIO::UDSEntry::UDS_NAME, url.fileName());
-        uds.fastInsert(KIO::UDSEntry::UDS_DISPLAY_NAME,
-                       i18nc("@title denoting that this directory shows a listing of snapshots for the path %1", "Snapshots for %1", url.path()));
+        if (QFileInfo(url.path()).isDir()) {
+            uds.fastInsert(KIO::UDSEntry::UDS_DISPLAY_NAME, url.fileName());
+        } else {
+            uds.fastInsert(KIO::UDSEntry::UDS_DISPLAY_NAME,
+                           i18nc("@title denoting that this directory shows a listing of snapshots for the path %1", "Snapshots for %1", url.fileName()));
+        }
         uds.fastInsert(KIO::UDSEntry::UDS_ICON_NAME, u"view-history"_s);
         uds.fastInsert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
         uds.fastInsert(KIO::UDSEntry::UDS_MIME_TYPE, u"inode/directory"_s);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.