Bug 433903

Summary: Files with quotes in filename can not be opened in Kate.
Product: [Applications] kate Reporter: Robert Czechowski <roczech+kdebugs>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: 19.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of the error message next to the file

Description Robert Czechowski 2021-03-03 11:14:25 UTC
Created attachment 136339 [details]
Screenshot of the error message next to the file

SUMMARY

Files with quotes in filename can not be opened in Kate.

STEPS TO REPRODUCE

1. Create file with quotes in filename, e. .g
$ touch 'the "foo"'

2. In Kate go to "File" -> "Open …"

3. Select the file 'the "foo"' and open it


OBSERVED RESULT

If a file named 'foo' exists, this file is opened.

If no such file exists, an error message appears: 'The file "/home/username/foo" could not be found'

In any case, the file 'the "foo"' is not opened.

EXPECTED RESULT

The file 'the "foo"' should be opened.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.04 and Kubuntu 20.10
KDE Plasma Version: 5.18.5 and 5.19.5
KDE Frameworks Version: 5.68.0 and 5.74.0
Qt Version: 5.12.8 and 5.14.2

ADDITIONAL INFORMATION

Bug might be related to https://bugs.kde.org/show_bug.cgi?id=421290 and https://bugs.kde.org/show_bug.cgi?id=352537
It seems quotes are not properly handled or escaped in File dialogues. However I see this bug as slightly more severe than the other ones, since it actually hinders me from opening files in Kate that I got from $somewhere_else.
Comment 1 Christoph Cullmann 2021-03-16 21:19:10 UTC
Works with the latest stable release:

Kate
Version 20.12.2

KDE Frameworks 5.79.0
Qt 5.15.2 (built against 5.15.2)

(I think the Frameworks version is the most important one)