diff options
Diffstat (limited to 'desktop-plasma/patches')
-rw-r--r-- | desktop-plasma/patches/kde-frameworks/kio:6/0001-TrashSizeCache-Use-correct-iterator-flags.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/desktop-plasma/patches/kde-frameworks/kio:6/0001-TrashSizeCache-Use-correct-iterator-flags.patch b/desktop-plasma/patches/kde-frameworks/kio:6/0001-TrashSizeCache-Use-correct-iterator-flags.patch new file mode 100644 index 0000000..a24e1c0 --- /dev/null +++ b/desktop-plasma/patches/kde-frameworks/kio:6/0001-TrashSizeCache-Use-correct-iterator-flags.patch @@ -0,0 +1,29 @@ +From 241eb504801bc4ee12555fa2c8737b409383ba5c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= <wolf@oriole.systems> +Date: Fri, 4 Oct 2024 16:27:40 +0200 +Subject: [PATCH] TrashSizeCache: Use correct flags for QDirIterator + +When calculating the size of the trash we walk through all files in the +trash path using QDirIterator. In 0ab81b6ba (trashimpl: optimize +TrashSizeCache::calculateSize, 2023-09-05) its invocation was changed to +include the QDir::NoDotAndDotDot filter. +--- + src/kioworkers/trash/trashsizecache.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/kioworkers/trash/trashsizecache.cpp b/src/kioworkers/trash/trashsizecache.cpp +index 81e71f4b9..e67618554 100644 +--- a/src/kioworkers/trash/trashsizecache.cpp ++++ b/src/kioworkers/trash/trashsizecache.cpp +@@ -146,7 +146,7 @@ TrashSizeCache::SizeAndModTime TrashSizeCache::scanFilesInTrash(ScanFilesInTrash + + // Iterate over the actual trashed files. + // Orphan items (no .fileinfo) still take space. +- QDirIterator it(mTrashPath + QLatin1String("/files/"), QDir::NoDotAndDotDot); ++ QDirIterator it(mTrashPath + QLatin1String("/files/"), QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); + qint64 sum = 0; + qint64 max_mtime = 0; + const auto checkMaxTime = [&max_mtime](const qint64 lastModTime) { +-- +2.46.2 + |