summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-03-26 19:02:04 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-03-29 15:51:02 +0300
commit646661d0be690c44355f56ffba873f842b291aa0 (patch)
treea70b6fe19dbd695a97745968592664f737cde74d
parent07e9829e44126ebd520a384a3c859d3643e3ded7 (diff)
downloadtdelibs-646661d0.tar.gz
tdelibs-646661d0.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>
-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 0dd96cb6..8e4eb976 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;
}