Bug 465762 - kate overwrites symlinks as regular files
Summary: kate overwrites symlinks as regular files
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-15 12:51 UTC by Adam Gergely
Modified: 2023-04-29 16:53 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Gergely 2023-02-15 12:51:51 UTC
SUMMARY
***
When using Kate to edit a file (in my example, on an SFTP connection in Dolphin), if I edit a file which is a symlink (relative path) to the real file, when I open the symlink it correctly reads the original file (the symlink's target) and imports the contents in the Kate window. But, when I make modifications, the symlink gets overwritten by a regular file which contains my modificaitons, but it is a separate file. Inspecting the original file (the symlink's target) does not reveal the modifications.
Other programs, such as LibreOffice, automatically save to the correct target file, even if opening and editing the Symlink.
***


STEPS TO REPRODUCE
1. Open an SFTP connection to a remote folder
2. Create a regular TXT file and edit something in it
3. In another directory on the remote SFTP server, create a Symbolic Link to the regular TXT file
4. When browsing on the remote folder, open the symbolic link with Kate. It should open the contents of the regular TXT file
5. Try to modify something in the file and Save
6. Upon save, KDE/Kate will replace te symbolic link with a regular TXT file containing the modificaitons. (the original TXT file will not be modified)

OBSERVED RESULT
Upon save, KDE/Kate will replace te symbolic link with a regular TXT file containing the modificaitons. (the original TXT file will not be modified)


EXPECTED RESULT
Upon save, KDE/Kate should retain the symbolic link and the modifications should be visible in the original target file of the symlink.


SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: Kubuntu 22.04.1 LTS
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Christoph Cullmann 2023-04-29 16:53:44 UTC
This looks for me rather like an issue of the fish io worker.