There are two files in a folder. Edit one file using Kate then save it as to replace the other one. The content of the other file should be changed as the content of the first one but it is not. Reproducible: Always Steps to Reproduce: 1. open Kate, 2. create a new file with content "file1" and then save using file name "file1", and keep this file opened 3. create a new file in a new tab with content "file2" and then save using file name "file2", and keep this file opened, too 4. save current session then close Kate 5. open Kate and reload previous session 6. change the content in "file2" from "file2" to "file2 replace file1" 7. save a copy of "file2" and select to replace/override "file1" and confirm override for the warnings 8. check the content of "file1" Actual Results: Content of "file1" remains to be the original after the replacing operation. Expected Results: Content of "file1" is expected to be the content of modified "file2". This problem is found to be with Kate 16.04 but still exists in Kate 16.08 when checked after openSUSE Tumbleweed upgrade yesterday.
It seems this is by design, that is: If you open in the Menu: Settings > Configure Kate > General, and then "[x] Warn about files modified by foreign processes", then you'll get a warning everytime the file is changed. Can you confirm?
Hi Dominik, I confirm that this option has been enabled. When I open "file2" then choose "save a copy as .." to override "file1", Kate warns about the overwrite but does not warn about change made to "file1". Actually, the problem is not the warning message but the content of "file1" (the targe file that was overwritten with the content from "file2") is NOT changed. Should we expect the target file content to be changed to the content of the file used to overwrite to the target file?
This problem still exists in 16.08.2. There would be no error if using "Save As..." instead of "Save Copy As..." from "File" in the menu bar.
Git commit db714d744fba689673a02d85dfbe168e8fbd4e2d by Christoph Cullmann. Committed on 24/07/2017 at 09:53. Pushed by cullmann into branch 'master'. fix save as copy, it missed to allow overwriting the destination file we check if we want that via a dialog, but we still always fail to do so M +2 -2 src/document/katedocument.cpp https://commits.kde.org/ktexteditor/db714d744fba689673a02d85dfbe168e8fbd4e2d
(In reply to Christoph Cullmann from comment #4) Thanks Christoph for this fix. Hopefully this will enter the repository soon.