Bug 502963

Summary: Saved files aren't given the .pgn extension to match the Open dialog's filter
Product: [Applications] knights Reporter: Peter Salewsky <peter>
Component: generalAssignee: Alexander Semke <alexander.semke>
Status: RESOLVED FIXED    
Severity: minor CC: aacid, john.kizer, kde-games-bugs-null
Priority: NOR    
Version First Reported In: 2.6.25040   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 25.04.2
Sentry Crash Report:

Description Peter Salewsky 2025-04-18 11:51:02 UTC
When saving a game, no extension is added to the input filename. Trying to open this file is not possible as a filter for *.pgn is applied (file not shown for selection). There is no hint anywhere that the user has to add the extension .pgn to the file name when saving the game.
Comment 1 Albert Astals Cid 2025-04-18 13:40:41 UTC
Just to confirm, you are not on KDE Plasma desktop, right?
Comment 2 Peter Salewsky 2025-04-18 16:07:32 UTC
(In reply to Albert Astals Cid from comment #1)
> Just to confirm, you are not on KDE Plasma desktop, right?

Right, it's Linux Mint Xfce.
inxi -S reports: Desktop: Xfce v: 4.18.1 Distro: Linux Mint 22.1 Xia
Comment 3 Bug Janitor Service 2025-05-03 03:47:31 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 John Kizer 2025-05-09 03:17:53 UTC
Hi - on my Fedora KDE 42 device, the extension ".pgn.lml" is added, which similarly is not searched for by the File > Open dialog. On an Ubuntu (GNOME) 24.04 VM, the extension ".lml" is added.

Thanks!
Comment 5 Alexander Semke 2025-05-09 06:44:41 UTC
(In reply to John Kizer from comment #4)
> Hi - on my Fedora KDE 42 device, the extension ".pgn.lml" is added, which
> similarly is not searched for by the File > Open dialog. On an Ubuntu
> (GNOME) 24.04 VM, the extension ".lml" is added.
this is a different bug that we'll fix, thanks for reporting it. The original problem is with the extension not being added in the file dialog on non-Plasma desktops.
Comment 6 Alexander Semke 2025-05-14 19:07:53 UTC
Git commit b052db7466c217166df216f61cbeabf4bca797ac by Alexander Semke.
Committed on 14/05/2025 at 19:07.
Pushed by asemke into branch 'release/25.04'.

When saving the game, use the proper extension "pgn" in case no extension was provided
in the file dialog. The currently used extension and the code in this area is a copy&paste bug
from LabPlot's code long time and we correct it now.

There is another problem that needs to be addressed here. Namely, no extension added on default
n the file dialog on non-Plasma desktops (reproduced the problem on IceWM, also reported in BUG: 503374).
This is something that needs to be checked in KF independently of this commit which we
need anyway also for cases where the option "automatically select the extension" was
not checked in the dialog and we need to ensure the proper extension in the code.
FIXED-IN: 25.04.2

M  +5    -17   src/knights.cpp

https://invent.kde.org/games/knights/-/commit/b052db7466c217166df216f61cbeabf4bca797ac