Hard links are not preserved by KDE applications Reproducible: Always Steps to Reproduce: 1. Create a file (a text file will do) 2. Create a HARD link to that file 3. Open one of the links with Kate (for example) 4. Do some edits 5. Save (NOT Save As!) Actual Results: A new file is created, replacing the original one, with the result that the hard link is broken. Expected Results: Hard links should be preserved. This is a pretty major fail and has caused me quite a bit of lost time trying to figure out why whatever modifications I was doing to a source code file were not being taken into account. Eventually I realised what was going on, but right now I cannot use neither Kate nor KWrite as my editor. I'm back to vim. :-(
I found bug 316240. This comment by David Faure is relevant: https://bugs.kde.org/show_bug.cgi?id=316240#c4 Then this change review: https://codereview.qt-project.org/#/c/52059/ There Thiago Macieira says: > Hardlinks being split up is not a bug, it's a feature. With further explanations: > Who says the effects are undesireable? At least I, the author of bug 316240, and the five voters on same. :-) > The hardlink may have been placed there so a backup copy could exist if the file got modified. Or it may not. It is totally not up to the developer to second guess a user's intention. Especially not on so flimsy grounds. Surely if one wants a backup copy one makes a COPY of a file, not a hard link? Can anybody point to an actual and intended example of this "backup by hard link" scenario? > Think of how Git shares object files between repositories: a hardlink is created and, if the file is modified for any reason (not one of the WORM files), it breaks the hardlink -- COW behaviour. Yes but Git controls all access to those files: the user never accesses them directly. This is *not* the case with the sort of files that KSaveFile is going to be operating on. Please note that: 1. Every other text editor in the known universe preserves hard links. 2. This results in inconsistent behaviour depending on whether a hard or soft link has been used (the latter are preserved). Sorry, but I really do think that this is most definitely a bug, not a feature.
KSaveFile no longer exists in KF5. Is this about Qt4/kdelibs4, or about Qt5's QSaveFile?
(In reply to David Faure from comment #2) > KSaveFile no longer exists in KF5. > > Is this about Qt4/kdelibs4, or about Qt5's QSaveFile? My apologies, QSaveFile I imagine? I'm on KDE Frameworks 5.18.0, Qt 5.5.1.
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!