Bug 426728

Summary: cannot save a file with a name including quote
Product: [Frameworks and Libraries] frameworks-kio Reporter: Patrick Silva <bugseforuns>
Component: Open/save dialogsAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: a.bontozoglou, a.samirh78, amanita+KDEBUGS, kdelibs-bugs, meven29, nate
Priority: VHI Keywords: regression
Version: 5.105.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=185433
Latest Commit: Version Fixed In:
Attachments: screenshot

Description Patrick Silva 2020-09-19 13:43:20 UTC
Created attachment 131776 [details]
screenshot

STEPS TO REPRODUCE
1. open Kate text editor
2. type anything and press ctrl+s
3. set file name to "file".txt and press enter/return

OBSERVED RESULT
the file is not save and an error message says "You can only select one file".
See the attached screenshot please.

EXPECTED RESULT
the file sohuld be saved

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 1 Nate Graham 2020-09-23 18:23:23 UTC
Heh, can confirm.
Comment 2 Méven Car 2020-10-25 09:12:16 UTC
this concerns saving contrary to https://bugs.kde.org/show_bug.cgi?id=185433
Comment 3 Patrick Silva 2023-08-26 22:41:46 UTC
*** Bug 473764 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2023-08-27 10:25:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1396
Comment 5 Méven Car 2023-09-02 13:00:33 UTC
Git commit a2b5765f64c7a38a683611654e4d0a61de87ef1a by Méven Car, on behalf of Andreas Bontozoglou.
Committed on 02/09/2023 at 14:59.
Pushed by meven into branch 'master'.

[kfilewidget] Fixing saving to files with quotes

- Escaping double quotes in KFileWidgetPrivate::setLocationText(QUrl)
- Adding a test for single-file mode (KFile::File)

M  +108  -0    autotests/kfilewidgettest.cpp
M  +1    -2    src/filewidgets/kfilewidget.cpp

https://invent.kde.org/frameworks/kio/-/commit/a2b5765f64c7a38a683611654e4d0a61de87ef1a
Comment 6 Nate Graham 2023-09-11 16:02:52 UTC
Git commit 5812fda982480942b8747fb639fdc654b5fa56da by Nate Graham, on behalf of Andreas Bontozoglou.
Committed on 11/09/2023 at 17:48.
Pushed by ngraham into branch 'kf5'.

[kfilewidget] Fixing saving to files with quotes

- Escaping double quotes in KFileWidgetPrivate::setLocationText(QUrl)
- Adding a test for single-file mode (KFile::File)
(cherry picked from commit 6a5736ce30494f6deab3489725815a7d33e1bacf)

M  +108  -0    autotests/kfilewidgettest.cpp
M  +1    -1    src/filewidgets/kfilewidget.cpp

https://invent.kde.org/frameworks/kio/-/commit/5812fda982480942b8747fb639fdc654b5fa56da
Comment 7 Patrick Silva 2023-10-20 17:13:53 UTC
This bug is still reproducible Arch Linux and neon unstable.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Graphics Platform: Wayland
Comment 8 Nate Graham 2023-10-20 19:16:38 UTC
Can also reproduce again. >:(