[BUG] File change detection works on local drives but has false change detections on some (rclone sftp) networked drives.
cmanley opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Description of the Issue
Unfortunately, I don't see a way of debugging the issue myself without recompiling the code, and as a non-C++ developer, I don't yet know how to add debug logging to the source where I need it.
I suspect that what's happening is that Notepad++ writes a file out and stores the current timestamp, then later on reads the timestamp of the file which is close but not exactly the same, here using the CompareFileTime WinAPI call:
It would be nice if a custom version of CompareFileTime could be written that allows for a optionally configurable tolerance time window (a few seconds at most) to treat as equal.
I don't want to disable file change monitoring because I need it on when editing local files.
I can try to debug what's happening myself if someone can advise how to add debug logging.
Steps To Reproduce
- Install rclone in Windows and configure it to mount a remote Linux SFTP service as a Windows drive.
- Open a file on that drive, edit it, and save it.
Current Behavior
Notepad++ keeps telling me that the remote file has changed and asks if I want to reload it.
Expected Behavior
To not tell me that the remote file has changed when it hasn't changed.
Also, when a file has changed, then below the current message in the dialog, please add some details such as expected timestamp, actual timestamp, and perhaps more, so the users can figure out what's really happening.
Debug Information
Notepad++ v8.6.5 (64-bit)
Build time : Mar 29 2024 - 17:04:43
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : p:\test.txt
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : OFF
OS Name : Windows 11 Pro (64-bit
OS Version : 23H2
OS Build : 22631.3447
Current ANSI codepage : 1252
Plugins :
ComparePlugin (2.0.2)
HexEditor (0.9.12)
HTMLTag (1.4.1)
MarkdownViewerPlusPlus (0.8.2)
mimeTools (3.1)
NppConverter (4.6)
NppExec (0.8.4)
NppExport (0.4)
NPPJSONViewer (2.0.6)
NppMarkdownPanel (0.7.3)
XMLTools (3.1.1.13)
Anything else?
No response