iconForURL(): Fix root directory (/) icon.

This resolves issue #128.
This also resolves issue TDE/tdebase#1.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/129/head
Mavridis Philippe 4 years ago
parent 07e9829e44
commit 646661d0be
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -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") // root of protocol: if we found nothing, revert to mimeTypeIcon (which is usually "folder")
if ( _url.path().length() <= 1 && ( i == unknown || i.isEmpty() ) ) if ( _url.path().length() <= 1 && ( i == unknown || i.isEmpty() ) )
i = mimeTypeIcon; i = mimeTypeIcon;
// special case: root directory (/) -- Gitea issue #128
if ( _url == KURL("file:///") )
i = "folder_red";
} }
return i; return i;
} }

Loading…
Cancel
Save