When I edit a file that has multiple aliases, after saving they are effectively duplicated into different files. Reproducible: Always Steps to Reproduce: touch "file1" ln file1 file2 kwrite file1 write something into kwrite and save Actual Results: The files differ Expected Results: They shouldn't differ The proper behaviour would be to truncate() and then write() if you want to delete the entire content and re-write it. This way the inode remains the same.
Reproduced with Kate. Arch Linux 64-bit Kate 16.04.2 KDE Frameworks 5.23.0 Qt 5.7 xcb wm
Remove QSaveFile in favor of plain old file saving Summary: Rationale: for many use cases that e.g. have acls, complex other extended attributes, static links e.g. the rename() doesnt do the trick it should other ways would be start to add workarounds to all cases, which is hard, e.g. if that is something shared via SMB... Test Plan: make && make test Reviewers: dhaumann, dfaure Reviewed By: dhaumann, dfaure Subscribers: dfaure, kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D14890