Bug 463140 - PreviewJob: Thumbnails are not saved to disk on Windows
Summary: PreviewJob: Thumbnails are not saved to disk on Windows
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.101.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-17 02:01 UTC by george fb
Modified: 2023-01-19 09:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description george fb 2022-12-17 02:01:27 UTC
SUMMARY
This is caused because on Windows the StatJob [link1] can't get the device id (it's always 0) [link2]; can get one with KFileItem though.

[link1] https://invent.kde.org/frameworks/kio/-/blob/9a71657097303ef60b1915c3218faab4fae42f7d/src/widgets/previewjob.cpp#L838
[link2] https://invent.kde.org/frameworks/kio/-/blob/9a71657097303ef60b1915c3218faab4fae42f7d/src/widgets/previewjob.cpp#L633

STEPS TO REPRODUCE
1. Run the previewtest from KIO
2. Insert path to an image in the text field
3. Click generate thumbnail
4. Check thumbnails folder (C:/Users/<username>/AppData/Local/cache/thumbnails/<size>)

OBSERVED RESULT
There is no thumbnail in the cache/thumbnails/<size> folder, even though there is one in the app

EXPECTED RESULT
Thumbnail should be present in the cache/thumbnails/<size> folder

SOFTWARE/OS VERSIONS
Windows: 10/11
KDE Frameworks Version: 100/101
Qt Version: 5.12.7
Comment 1 Bug Janitor Service 2023-01-08 17:21:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1104
Comment 2 Méven Car 2023-01-19 09:04:04 UTC
Git commit dfa417c616d49a61fae08eb67925b77817253dc6 by Méven Car, on behalf of George Florea Bănuș.
Committed on 19/01/2023 at 08:20.
Pushed by meven into branch 'master'.

previewjob: fix thumbnails not saving to disk on windows

M  +13   -0    src/widgets/previewjob.cpp

https://invent.kde.org/frameworks/kio/commit/dfa417c616d49a61fae08eb67925b77817253dc6