https://bugs.kde.org/show_bug.cgi?id=488641
Bug ID: 488641 Summary: Incorrect warning when saving file modified on disk under a new name Classification: Applications Product: kate Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: spikespie...@gmx.de Target Milestone: --- SUMMARY When a file is modified on disk while it is open in Kate, one of the ways to mitigate data loss is to save the old version under a new name using the "Save As..." function (File > Save as, or CTRL-SHIFT-S). However, Kate displays a misleading warning if the user tries to do this. STEPS TO REPRODUCE 1. (assuming no directory test exists) mkdir test; cd test; touch test1; kate test1 2. echo 1 >> test 1 3. A banner pops up in kate, informing the user that the file was modified on disk. 4. File > Save As, choose test2 as the new name. OBSERVED RESULT A warning dialog opens: "Possible data loss – Kate The file /home/<username>/test/test2 was modified on disk. Do you really want to save this file? Both your open file and the file on disk were changed. There could be some data lost." The first part is a straight up untruth - ~/test/test2 was not modified on disk; it doesn't even exist yet. The second part is confusing. At first, I thought it was an untruth as well, but it is true - if the modified file was saved under a different name and the user made modifications as well, the original version of the first file would be lost. (But Kate allows undo even after saving, so at least as far back as the undo stack goes, the data can still be recovered after saving). EXPECTED RESULT The most important is that Kate does not lie about the new file I'm saving to being modified on disk. This is very confusing. As more of a wishlist item, the second part of the message should be rewritten to make it clearer what is actually going on, and what happens if the user saves. One option would be a message similar to "The original file .../test1 was modified on disk by another program. If you save now, the version you edited and the modifications made by the external program are both safe. You will lose access to the original, unmodified version of the file". Obviously, the phrasing could be improved and tightened Alternatively, get rid of the message and trust that the user knows the original version would be lost. I think that's how most editors do "Save as" in these circumstances; but having Kate be extra clear about potential data loss is not a bad idea as long as it's clear what data are lost. SOFTWARE/OS VERSIONS This happens on both Kubuntu 24.04 with Kate 23.08.05 and current Neon Developer with Kate 24.07.70. -- You are receiving this mail because: You are watching all bug changes.