diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-26 19:02:04 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-06-07 14:48:41 +0200 |
commit | 92bb9740fa5790b88d470371001d4cfdc6026b94 (patch) | |
tree | 0126d8dc57dc277fbf0f2268ce283b4a12541492 | |
parent | 775f264a47859f9810f4377eeebee3f8482d2848 (diff) | |
download | tdelibs-92bb9740fa5790b88d470371001d4cfdc6026b94.tar.gz tdelibs-92bb9740fa5790b88d470371001d4cfdc6026b94.zip |
iconForURL(): Fix root directory (/) icon.
This resolves issue #128.
This also resolves issue TDE/tdebase#1.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
(cherry picked from commit 646661d0be690c44355f56ffba873f842b291aa0)
-rw-r--r-- | kio/kio/kmimetype.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp index f63903c27..c1b4b7278 100644 --- a/kio/kio/kmimetype.cpp +++ b/kio/kio/kmimetype.cpp @@ -525,6 +525,10 @@ TQString KMimeType::iconForURL( const KURL & _url, mode_t _mode ) // root of protocol: if we found nothing, revert to mimeTypeIcon (which is usually "folder") if ( _url.path().length() <= 1 && ( i == unknown || i.isEmpty() ) ) i = mimeTypeIcon; + + // special case: root directory (/) -- Gitea issue #128 + if ( _url == KURL("file:///") ) + i = "folder_red"; } return i; } |