- AuthorPosts
- March 19, 2008 at 5:50 am #5592LTTParticipant
I selected “prompt when changed” and opened McAfee VirusScan’s AccessProtectionLog (UTF-8 with Signature, <2MB) with EmEditor. While Notepad2 always detected the changes, EmEditor never.
March 19, 2008 at 4:33 pm #5593Yutaka EmuraKeymasterLTT wrote:
I selected “prompt when changed” and opened McAfee VirusScan’s AccessProtectionLog (UTF-8 with Signature, <2MB) with EmEditor. While Notepad2 always detected the changes, EmEditor never.In the Current Configuration Properties > File tab, what is selected for “Changed by Another Program” drop-down list?
March 21, 2008 at 3:14 am #5596LTTParticipantChanged by Another Program: Prompt.
Monitor Interval: 5.I tested further and found this problem happened only when the content of the file(s) was changed by McAfee VirusScan itself. If I use Notepad2 to change the content of the file(s), EmEditor will prompt. But if the content of the same file(s) is changed by McAfee VirusScan, EmEditor will never know, no matter how long I wait.
March 21, 2008 at 3:58 am #5597Yutaka EmuraKeymasterLTT wrote:
Changed by Another Program: Prompt.
Monitor Interval: 5.I tested further and found this problem happened only when the content of the file(s) was changed by McAfee VirusScan itself. If I use Notepad2 to change the content of the file(s), EmEditor will prompt. But if the content of the same file(s) is changed by McAfee VirusScan, EmEditor will never know, no matter how long I wait.
When McAfee VirusScan modified the file, is the time stamp also changed? If the time stamp is not changed, EmEditor cannot detect the change.
March 21, 2008 at 7:03 pm #5600LTTParticipantYutaka wrote:
If the time stamp is not changed, EmEditor cannot detect the change.Oh yes, that’s the point! Thanks!
I tested on some other editors. Only a few (e.g. Notepad2, UltraEdit) detect the content(maybe the size) change.
April 2, 2008 at 10:40 am #5632ujrParticipantWouldn’t it be better to use the NTFS file change notification (if the file is located on an NTFS volume, of course) anyway?
April 12, 2008 at 10:28 am #5656doctorowParticipantI second that. I was surprised to find out EmEditor would rely on something crude like time stamp checking to detect file changes. Btw, does that also mean it is constantly polling a file’s time stamp? That would be bad. Either way, there are better and more reliable ways, and as already suggested, if the underlying storage is NTFS-based, something like the FindFirstChangeNotification API would be strongly preferred.
In the MSDN library, the path is Win32 and COM Development -> System Services -> File Services ->File Systems ->Directory Management -> Using Directory Management ->Obtaining Directory Change Notifications.
Code examples can be found here: http://msdn2.microsoft.com/en-us/library/atwhk15d.aspx
- AuthorPosts
- You must be logged in to reply to this topic.