Bug 504151 - Confusing message "The file <...> was created on disk", should say "modified"
Summary: Confusing message "The file <...> was created on disk", should say "modified"
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.04.0
Platform: Manjaro Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-13 14:08 UTC by php4fan
Modified: 2025-05-30 18:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2025-05-13 14:08:35 UTC
STEPS TO REPRODUCE
1. open a file in Kate
2. from outside of Kate, modify the file
3. go back to Kate

OBSERVED RESULT
The warning says "The file '[path]' was CREATED on disk"

EXPECTED RESULT
It should say "The file ... was MODIFIED on disk".
"Created" makes no sense. "Created" suggests that the file didn't exist before, but it did. I can't imagine a different use case where the message as is would make sense. Well actually there is one that would sort of make sense (but "modified" would still be fine and actually still better) which is the case in bug 504150 but the prompt doesn't show up at all in that 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
Comment 1 Christoph Cullmann 2025-05-30 18:40:04 UTC
Ok, I see that is confusing.

I guess that happens if we get the file was created notice from the dir watch.

e.g. if one does 

kate test
rm test && touch test
Comment 2 Christoph Cullmann 2025-05-30 18:41:02 UTC
As we only watch files that did exist once, I guess it is best to just collapse that with modified in the output, less confusing.
Comment 3 Christoph Cullmann 2025-05-30 18:53:39 UTC
Git commit 1904ecfe785303c88240f3f455192bcf4424063c by Christoph Cullmann.
Committed on 30/05/2025 at 18:53.
Pushed by cullmann into branch 'master'.

don't confuse users, just report modified on disk

unlink and rename will trigger this

M  +1    -5    src/document/katedocument.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/1904ecfe785303c88240f3f455192bcf4424063c