Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5592

    LTT
    Participant

    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.

    #5593

    Yutaka Emura
    Keymaster

    LTT 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?

    #5596

    LTT
    Participant

    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.

    #5597

    Yutaka Emura
    Keymaster

    LTT 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.

    #5600

    LTT
    Participant

    Yutaka 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.

    #5632

    ujr
    Participant

    Wouldn’t it be better to use the NTFS file change notification (if the file is located on an NTFS volume, of course) anyway?

    #5656

    doctorow
    Participant

    I 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

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone