Bug 423499

Summary: KFileItem::iconName ignorant of isSlow() and can block gui thread
Product: [Frameworks and Libraries] frameworks-kio Reporter: Harald Sitter <sitter>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: normal CC: accounts+kde, kdelibs-bugs, nate
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=178678
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 423082    

Description Harald Sitter 2020-06-25 13:44:09 UTC
```
    if (isLocalUrl && !delaySlowOperations && isDir()) {
        if (isDirectoryMounted(url)) {
            d->m_iconName = iconFromDirectoryFile(url.toLocalFile());

```

if the file system is a mounted sshfs or cifs we'll read the .directory files but really we shouldn't because they are network bound and may be slow. Furthermore they may be backed by HDDs which may crumble under stress. Since iconFromDirectoryFile does blocking POSIX reads this effectively means the gui thread will block on slow network mounts.

isSlow() should be taken into consideration somewhere in that block.