Bug 504071 - When using SaveFile with "current_file" the extension is removed
Summary: When using SaveFile with "current_file" the extension is removed
Status: REPORTED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.3.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-11 18:29 UTC by Colin Kinloch
Modified: 2025-05-13 18:41 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Kinloch 2025-05-11 18:29:38 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

When using org.freedesktop.portal.FileChooser.SaveFile with "current_file" the extension is removed.

STEPS TO REPRODUCE
1. Use SaveFile with "current_folder" and "current_name" to save a file with an extension.
2. Use SaveFile with "current_file" to save over the previous file.
3. Notice that it is offering to save without the extension.

OBSERVED RESULT

The dialog resulting from SaveFile with "current_file" set fills the filename field without an extension.

EXPECTED RESULT

Either the filename field should have the extension of the value provided by "current_file" or the filter should automatically select the filter that matches the given extension.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora 42 using GNOME desktop with KDE portals.
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION

I found this while working on SDL: https://github.com/libsdl-org/SDL/pull/13007
I worked around it by setting the "current_filter" field.