Bug 502253

Summary: Opening an image with a square bracket in its path causes irregular behavior
Product: [Applications] gwenview Reporter: klazoklazo
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: john.kizer
Priority: NOR    
Version First Reported In: 24.12.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description klazoklazo 2025-03-31 18:12:02 UTC
SUMMARY
Placing an open or closed square bracket symbol anywhere in a image's filepath causes Gwenview to act irregularly, typically resulting in the program reloading the already loaded image or sending the user to a different image after the chosen image was initially loaded.

STEPS TO REPRODUCE
1. Place an image within a folder (or folders within that folder) whose name contains a square bracket, or place a square bracket within the image's filename
2. Open image within that folder and/or with that filename in Gwenview
3. Observe behavior

OBSERVED RESULT
Placing the square bracket symbol in a folder (or folder containing folders) containing multiple images causes Gwenview to immediately load the first image of the folder even if opening a different image, including if images' names within that folder contain square brackets. Placing the square bracket symbol only in an image's filename (including when other images' filenames contain square brackets) but not in any of the folders containing that image causes Gwenview to reload the image you opened after loading it initially.

EXPECTED RESULT
Opening an image in Gwenview should only load the chosen image initially and keep the user there.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
Comment 1 John Kizer 2025-04-10 18:20:39 UTC
Hi - for what it's worth, I can't reproduce this on Gwenview 24.12.3 on my Fedora KDE 41 device.

If you run Gwenview from the terminal, do you get any potentially helpful messages printed to that terminal when this issue is triggered?

Thanks!
Comment 2 klazoklazo 2025-04-10 18:27:03 UTC
(In reply to John Kizer from comment #1)
> Hi - for what it's worth, I can't reproduce this on Gwenview 24.12.3 on my
> Fedora KDE 41 device.
> 
> If you run Gwenview from the terminal, do you get any potentially helpful
> messages printed to that terminal when this issue is triggered?
> 
> Thanks!

I think at some point within the upgrade to KDE 6.3.4 something got fixed because I can no longer reproduce the issue either. Guess that's that!