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

            Bug ID: 517357
           Summary: Incompatible thumbnail cache between Gwenview and
                    Dolphin
    Classification: Applications
           Product: gwenview
      Version First 25.12.3
       Reported In:
          Platform: unspecified
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The Gwenview thumbnailer  cacher does not properly encode file URI leading to
incorrect hash code and interop with other XDG thumbnail consumers/producers.
This can be verified with any path containing spaces for example.

0. Setup dolphin and gwenview to use 256px thumbnails.
1. Delete all thumbnails (`rm -rf ~/.cache/thumbnails/*`) 
2. Open a folder with large enough image files (`gwenview  "some/folder with
spaces/files"`)
3. Wait for thumbnail generation
4. Open dolphin on the same folder
5. Dolphin regenerates thumbnails - expected it to use the same thumbnails
6. `~/.cache/thumbnails/large` contains about 2x the number of thumbs it should

I believe the problem is the URI encoding. Dolphin uses the "full" encoding and
gwenview uses the "pretty" encoding:

>From kio-extras we have full encoding, which escapes spaces:
https://github.com/KDE/kio-extras/blob/5d20ceb39e5725e2a575583b071acb165335237d/thumbnail/thumbnail.cpp#L796

And in gwenview we have pretty encoding:
https://github.com/KDE/gwenview/blob/f8e7bb9d9ecb851e023a8c71389d269084ce78d5/lib/thumbnailprovider/thumbnailprovider.cpp#L74

The XDG spec says
https://specifications.freedesktop.org/thumbnail/latest/thumbsave.html

"use of the canonical, minimally encoded form of the URI is required to avoid
mismatches between thumbnail generator and thumbnail reader."

So I can see it going either way. But I guess KDE frameworks wins?

Gwenview:  25.12.3
Dolphin: 25.12.2
Linux/KDE Plasma: User-2026-03-05
KDE Plasma Version: 6.6.1
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2

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

Reply via email to