Bug 292275

Summary: Kate does not detect changed files on network filesystems
Product: [Unmaintained] kdelibs Reporter: Christoph Bartoschek <bartoschek>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: major CC: rollopack
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christoph Bartoschek 2012-01-23 15:54:09 UTC
Version:           unspecified (using KDE 4.7.2) 
OS:                Linux

Today I lost some work because I relied on kate to detect file changes.
Kate somehow did not detect that I changed a file on a different machine. When I later saved the file I overwrote my earlier changes accidentally.

Reproducible: Always

Steps to Reproduce:
1. Open a file in kate on machine A.
2. Edit the file in kate
3. Edit and save the file on machine B.
4. Save the file in kate

Actual Results:  
The changes in step 3 are lost and kate does not detect that the file changed underneath.

Expected Results:  
In step 4 kate detects that the file has been changed externally and prompts for user interaction.

The filesystem is mounted via NFS on both machines.
Comment 1 Dominik Haumann 2012-01-31 09:14:58 UTC
That depends on how your system is configured, i.e., whether the file notification system also works for NFS mounted partitions. This does not seem to be the case. It's no a kate issue, hence, forwarding.
Comment 2 Christoph Bartoschek 2012-01-31 09:20:17 UTC
I am not aware of any file change notification system that correctly works for NFS partitions. 

In my opinion kate should not depend on such a system. There is always the possibility that a notification is lost or not generated.

To play on the save side kate should check before it saves whether the file has the expected contents. The current behaviour causes data loss.
Comment 3 Gabriel Rolland 2017-08-25 07:44:05 UTC
Same problem with a CIFS mount.

Version:           16.08.3 (using KDE Frameworks 5.28.0) 
OS:                Linux
Comment 4 Justin Zobel 2022-11-08 06:50:05 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 Gabriel Rolland 2022-11-08 09:17:03 UTC
With Kate 22.04.3 and files on a cifs share the problem no longer exists. :-)