https://bugs.kde.org/show_bug.cgi?id=524618

            Bug ID: 524618
           Summary: Thumbnailer keeps generating thumbnails of thumbnails
                    recursively
    Classification: Frameworks and Libraries
           Product: kio-extras
      Version First unspecified
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Thumbnails and previews
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 195385
  --> https://bugs.kde.org/attachment.cgi?id=195385&action=edit
ls -R and identify -verbose output for ~/.cache/thumbnails/, showing recursive
Thumb::URI links.

I noticed that the thumbnailer creates thumbnails for files inside
~/.cache/thumbnails/ itself. For example, I had a cached thumbnail of a large
PNG in x-large/69dc2fa...png, then later when browsing that cache folder, it
generated another thumbnail x-large/0f5f28e...png which pointed to the first
one via Thumb::URI metadata. Then it kept going into large/ and normal/
folders, making copies of copies.

This seems to happen because the thumbnail worker doesn't check if the
requested file is already a cached thumbnail. It just treats any .png as a
normal image and tries to make a thumbnail for it.

Steps to reproduce:
1. Have some image files so thumbnails get created (normal/large/x-large
folders).
2. Open the cache folder (e.g. ~/.cache/thumbnails/x-large/) in Dolphin or any
viewer that requests thumbnails.
3. The existing cached pngs will be processed again, generating new files with
different hashes.

Result: Lots of duplicate thumbnails, wasted disk space and CPU.

Expected: The thumbnailer should skip files that are already in the cache
directory, or at least ignore them.

I think a simple fix would be to add a path check in ThumbnailProtocol::get()
to return early if the file is under the thumbnails cache folder.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to