*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY STEPS TO REPRODUCE 1. open a file in Kate 2. from outside of Kate, delete the file >>> a prompt pops up as expected with the message "The file has been deleted or moved on disk" and the options "Close", "Save as...", "Ignore" 3. now from outside of kate, re-create the file at the same path with the same name, and put some contents in it OBSERVED RESULT Nothing happens. The "the file has been deleted..." prompt remains EXPECTED RESULT The prompt should change to "the file was modified on disk" with the options "enable autoreload", "view difference", "reload", "ignore" (BTW the normal popup for when the file is modified currently says "the file was CREATED" instead of saying "the file was MODIFIED", which accidentally would make sense in this particular situation [if the prompt did show up], but it's confusing in the general case) SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.13.0 Qt Version: 6.9.0 Kernel Version: 6.6.88-1-MANJARO (64-bit) Graphics Platform: Wayland Processors: 12 × 12th Gen Intel® Core™ i7-1255U Memory: 15.3 GiB of RAM Graphics Processor: Intel® Iris® Xe Graphics Manufacturer: ASUSTeK COMPUTER INC. Product Name: Vivobook_ASUSLaptop X1502ZA_F1502ZA System Version: 1.0 ADDITIONAL INFORMATION
I think as soon as the file is gone we loose the file watcher for it, but I might be wrong.
I can reproduce on Kate 25.04.1 - although just to note, the prompt does update if you try to save using the deleted prompt, then decline to potentially overwrite data on disk when warned (the dialog with the "Save Nevertheless" option). Thanks!
If somebody has interest to fix that, that is welcome, not sure how to do best, guess one would need to watch the directory, too.
Git commit 6f74166359e2724ec05d2b100e31f9d5dfd218fb by Christoph Cullmann. Committed on 01/06/2025 at 16:16. Pushed by cullmann into branch 'master'. trigger refresh of modified on disk message if the type did change e.g. for touch test kate test rm test touch test M +3 -1 src/document/katedocument.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/6f74166359e2724ec05d2b100e31f9d5dfd218fb
Was easier than thought to fix, just a bit too much guarding.