Just upgraded from CentOS6 to CentOS 7 and hence from kwrite 4.3.4 to kwrite 4.14.8. This version of kwrite always creates a new file as opposed to updating the exiting file, i.e. the file i-node changes. For the most part this does not matter, but does have subtle implications: a) this means I cannot edit a file to which I have write access, but is located in a directory where I don't have write access; and b) this breaks any exiting hard-links to the file.
The reason for this is that we use QSaveFile [1] to safely save data to disk: It saves to a temporary file, and on success, the temporary file is moved to the final location. This leads to this bug, bug avoids data loss in case of a crash (e.g. power outage). Let's track this in bug #358457. We track these problems here: - https://bugs.kde.org/show_bug.cgi?id=354405 Files are unlinked on save - https://bugs.kde.org/show_bug.cgi?id=358457 Kate removes hard links - https://bugs.kde.org/show_bug.cgi?id=333577 Kate changes file owner [1] http://doc.qt.io/qt-5/qsavefile.html *** This bug has been marked as a duplicate of bug 358457 ***