diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/kfileitemmodelrolesupdater.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index 0c204e474..14e7f00ff 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -839,7 +839,9 @@ int KFileItemModelRolesUpdater::subItemsCount(const QString& path) const } } - if (!showFoldersOnly || dirEntry->d_type == DT_DIR) { + // If only directories are counted, consider an unknown file type also + // as directory instead of trying to do an expensive stat() (see bug 292642). + if (!showFoldersOnly || dirEntry->d_type == DT_DIR || dirEntry->d_type == DT_UNKNOWN) { ++count; } } |
