Bug 508993 - Gwenview automatically jumps to the first image when opening files from paths containing square brackets ("[" or "]")
Summary: Gwenview automatically jumps to the first image when opening files from paths...
Status: REPORTED
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.04.3
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-01 07:22 UTC by liusen
Modified: 2025-09-04 12:19 UTC (History)
1 user (show)

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


Attachments
screen recording (604.08 KB, video/mp4)
2025-09-02 11:03 UTC, liusen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description liusen 2025-09-01 07:22:04 UTC
SUMMARY

Gwenview automatically jumps to the first image when opening files from paths containing square brackets ("[" or "]")

STEPS TO REPRODUCE
1. Create a folder containing multiple images, with square brackets in its path (e.g. /home/user/Pictures/[Test])
2. Open Dolphin file manager and navigate to this folder
3. Click to open any image (not the first one) via Gwenview

OBSERVED RESULT

1. Gwenview briefly shows the selected image, then immediately auto-jumps to the first image in the folder
2. Issue occurs consistently when path contains either "[" or "]" characters
3. Normal folder paths (without square brackets) work as expected

EXPECTED RESULT

Gwenview should display the selected image and allow normal navigation through the folder

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.8.3
Kernel Version: 6.15.9-101.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
Memory: 32 GiB of RAM (27.1 GiB usable)
Graphics Processor: AMD Radeon 780M

ADDITIONAL INFORMATION
Comment 1 A Linux User 2025-09-02 10:35:15 UTC
Cannot reproduce.
I created a folder [test], navigated in Dolphin to it and opened the third image and it was correct.

Are you using the latest Gwenview version (25.08.0?)

Can you upload a screencast of the issue?
Comment 2 liusen 2025-09-02 11:03:13 UTC
Created attachment 184646 [details]
screen recording

I'm using Gwenview 25.04.3, the latest version in Fedora 41 repo.
Comment 3 A Linux User 2025-09-02 11:12:33 UTC
I see. Sadly, without checking whether the bug persists for you in the most recent version of Gwenview from Fedora 42, we cannot really do much.
Comment 4 liusen 2025-09-02 11:22:23 UTC
(In reply to A Linux User from comment #3)
> I see. Sadly, without checking whether the bug persists for you in the most
> recent version of Gwenview from Fedora 42, we cannot really do much.

I will (In reply to A Linux User from comment #3)
> I see. Sadly, without checking whether the bug persists for you in the most
> recent version of Gwenview from Fedora 42, we cannot really do much.

I'll try to upgrade Gwenview to the latest version, or upgrade the entire system to Fedora 42, but it will take some time.
Comment 5 liusen 2025-09-02 12:07:22 UTC
I have successfully upgraded Gwenview to the latest version (25.08.0), the issue still persists.

ps: 

The problem was first observed while browsing the ~/Pictures/xxx directory. Through testing, I determined the issue appears to be related to square brackets [ and ] in the file path.

When recording the screen demonstration, I moved the problematic folder containing images to ~/Public to avoid interference from other folders in ~/Pictures. However, this resulted in different behavior than what was originally observed (as shown in the screen recording).

I'm unable to explain why the behavior changed.
Comment 6 A Linux User 2025-09-04 12:04:12 UTC
(In reply to liusen from comment #5)
> I have successfully upgraded Gwenview to the latest version (25.08.0), the
> issue still persists.
 Thanks for checking!
> ps: 
> 
> The problem was first observed while browsing the ~/Pictures/xxx directory.
> Through testing, I determined the issue appears to be related to square
> brackets [ and ] in the file path.
> 
> When recording the screen demonstration, I moved the problematic folder
> containing images to ~/Public to avoid interference from other folders in
> ~/Pictures. However, this resulted in different behavior than what was
> originally observed (as shown in the screen recording).
> 
> I'm unable to explain why the behavior changed.

I still cannot reproduce, even with ~/Public and ~/Pictures.

Maybe someone else can check?
Comment 7 liusen 2025-09-04 12:19:26 UTC
(In reply to A Linux User from comment #6)
> (In reply to liusen from comment #5)
> > I have successfully upgraded Gwenview to the latest version (25.08.0), the
> > issue still persists.
>  Thanks for checking!
> > ps: 
> > 
> > The problem was first observed while browsing the ~/Pictures/xxx directory.
> > Through testing, I determined the issue appears to be related to square
> > brackets [ and ] in the file path.
> > 
> > When recording the screen demonstration, I moved the problematic folder
> > containing images to ~/Public to avoid interference from other folders in
> > ~/Pictures. However, this resulted in different behavior than what was
> > originally observed (as shown in the screen recording).
> > 
> > I'm unable to explain why the behavior changed.
> 
> I still cannot reproduce, even with ~/Public and ~/Pictures.
> 
> Maybe someone else can check?

No suspicious log entries were found in Gwenview too.

 I suspect the issue lies with one of Gwenview's dependency components rather than Gwenview itself, though I'm unable to pinpoint which one. 

I've reproduced this behavior on a clean Fedora 41 virtual machine after updating all software to the latest versions – this occurs with ‌both the repository version (25.04.3) and a self-compiled 25.08.0 version built from SRPM.‌