Bug 454648

Summary: "Save as" with remote file tries to use former filename as directory
Product: [Applications] kate Reporter: Rolf Eike Beer <kde>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 22.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rolf Eike Beer 2022-05-31 10:20:11 UTC
STEPS TO REPRODUCE
1. open a file using a remote protocol like sftp
2. try to "save as"

OBSERVED RESULT
You will get a warning "file sftp://path/to/file/filename does not exist", and the whole filename is shown in the folder view.
Nitpick: the error message is also not wrapped so it's often cut off for longer paths.

EXPECTED RESULT
The filename should be cut off before trying to open the target directory.

SOFTWARE/OS VERSIONS
I have observed this at least in 20.04.2 and 22.04.1, both from Kate as well as KDevelop.
Comment 1 Christoph Cullmann 2022-06-16 15:09:16 UTC
Git commit 0467fddbcbbd1d90c0d6207e0c2dc68f24dc3183 by Christoph Cullmann.
Committed on 16/06/2022 at 15:09.
Pushed by cullmann into branch 'master'.

avoid that saveAs uses filename as directory

M  +4    -3    src/document/katedocument.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/0467fddbcbbd1d90c0d6207e0c2dc68f24dc3183