diff options
| author | Méven Car <[email protected]> | 2020-11-05 07:58:24 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2020-11-07 06:21:11 +0000 |
| commit | 1c2fbdef09f1756c337cab39c2d229b22b11fb5b (patch) | |
| tree | 2a5bcb9735825205783bbde9414f8e8e70a5a712 /src | |
| parent | 465e06138e8baaefb967d32a2eaccf67daef8285 (diff) | |
KDirectoryContentsCounter: fix support of symlinks dir
BUG: 428712
FIXED-IN: 20.12
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/private/kdirectorycontentscounter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kitemviews/private/kdirectorycontentscounter.cpp b/src/kitemviews/private/kdirectorycontentscounter.cpp index d33277a3b..a2a27ad28 100644 --- a/src/kitemviews/private/kdirectorycontentscounter.cpp +++ b/src/kitemviews/private/kdirectorycontentscounter.cpp @@ -115,7 +115,7 @@ void KDirectoryContentsCounter::slotResult(const QString& path, int count, long } // sends the results - Q_EMIT result(resolvedPath, count, size); + Q_EMIT result(path, count, size); } void KDirectoryContentsCounter::slotDirWatchDirty(const QString& path) @@ -160,11 +160,12 @@ void KDirectoryContentsCounter::slotItemsRemoved() void KDirectoryContentsCounter::startWorker(const QString& path) { - const bool alreadyInCache = s_cache->contains(path); + const QString resolvedPath = QFileInfo(path).canonicalFilePath(); + const bool alreadyInCache = s_cache->contains(resolvedPath); if (alreadyInCache) { // fast path when in cache // will be updated later if result has changed - const auto pair = s_cache->value(path); + const auto pair = s_cache->value(resolvedPath); Q_EMIT result(path, pair.first, pair.second); } |
