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 646661d0be)
v3.5.13-sru
Mavridis Philippe 3 years ago committed by Slávek Banko
parent 775f264a47
commit 92bb9740fa
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -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;
}

Loading…
Cancel
Save