Bug 454648 - "Save as" with remote file tries to use former filename as directory
Summary: "Save as" with remote file tries to use former filename as directory
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: 22.04.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-31 10:20 UTC by Rolf Eike Beer
Modified: 2022-06-16 15:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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