summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-03-26 19:02:04 +0200
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-03-29 22:04:51 +0900
commit6ae88683a32f989ffb67e7b2af7774a144192925 (patch)
tree9917a783d9643213570f558e2c30c53bd04563f0
parentf36151ed0f8de4bcced2ca24a33b30266af75782 (diff)
downloadtdelibs-6ae88683.tar.gz
tdelibs-6ae88683.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--tdeio/tdeio/kmimetype.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tdeio/tdeio/kmimetype.cpp b/tdeio/tdeio/kmimetype.cpp
index 197670916..036818854 100644
--- a/tdeio/tdeio/kmimetype.cpp
+++ b/tdeio/tdeio/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;
}