F.e. saving an html with 3 baloo.rating (ext attr), I get an html with 0 baloo.rating. Not so with LibreOffice and odt, ods files, or Sigil with epub, or Showphoto with jpg. It's a bug, I believe: why kate change the file rating? Thank you
Nobody can answer?
This is a side effect of using QSaveFile which first writes the new data to a temporary file and then renames the new file over the old one. This renaming is atomic which means that we always have either the old data or the new. We never get into the situation that only parts of the file is written. This unfortunately also means that thee are some corner cases that are not handled correctly. In your situation I think that the meta-data is not copied to the new file. QSaveFile does handle file attributes for the most common situations.
Thank you, Kåre Särs. So there is now no possible solution... Maybe a next release of Kate (but the problem there is also with html modified with others text editor, such gedit)?
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
I honestly did not understand how the problem is solved. It still gives me the same behavior...
Kate master no longer unlinks the file but only directly writes to it. That avoids the loss of the meta data.
I tried with Kate 16.08.0-KF5.27 appimage (in Kubuntu there is still an old realease), but it dit not work (with a html and a php file) :(
Hi, you can not try that with that app image. You need a very recent version for that compiled from the master branch. Frameworks 5.50 will contain the fix. Everything below will be broken.
Ok, thank you very much!!