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)
r14.0.x
Mavridis Philippe 4 years ago committed by Michele Calgaro
parent f36151ed0f
commit 6ae88683a3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

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