Bug 506465 - Double quotes in the path cause images to fail to open in Koko
Summary: Double quotes in the path cause images to fail to open in Koko
Status: RESOLVED FIXED
Alias: None
Product: Koko
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-02 02:07 UTC by Nate Graham
Modified: 2025-08-07 14:12 UTC (History)
2 users (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 Nate Graham 2025-07-02 02:07:18 UTC
STEPS TO REPRODUCE
1. Create a folder called "something" (including the double quotes) in your home folder and put a picture in it
2. Navigate there and open the picture in Koko


OBSERVED RESULT
Error message saying "The file or folder /home/[you]/%22something%22 does not exist".


EXPECTED RESULT
The file is opened


ADDITIONAL INFORMATION
Koko is built from today's git master
Comment 1 Bug Janitor Service 2025-08-06 21:27:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/koko/-/merge_requests/206
Comment 2 Oliver Beard 2025-08-07 14:12:16 UTC
Git commit 73b351653ed1842afd99ce7c7a790d588da20234 by Oliver Beard.
Committed on 07/08/2025 at 14:10.
Pushed by olib into branch 'master'.

Fix mishandling of URL containing quotes in QUrl–QString dance

Rather than keep converting a path between QUrl and QString, just keep it as a QUrl and do the right things: we have a QUrl, ImageFolderModel wants a QUrl. Keep it as a QUrl.

We can instead use QUrl functionality to get the parent directory, rather than manipulate a string. This fixes an issue where 'Open With'/arguments to a file where a parent directory has quotes, literally "something", causes an error in ImageFolderModel.

M  +2    -3    src/dirmodelutils.cpp
M  +1    -1    src/dirmodelutils.h
M  +3    -4    src/qml/Main.qml

https://invent.kde.org/graphics/koko/-/commit/73b351653ed1842afd99ce7c7a790d588da20234