Refactor WindowsFileSystemWatcher to properly handle file modifications

This commit is contained in:
Wojtek Figat
2024-06-02 00:51:11 +02:00
parent 6dacf9e1f1
commit 2492d0b38f
4 changed files with 116 additions and 109 deletions

View File

@@ -35,16 +35,18 @@ void DirectoryWatchCallback( ConstFSEventStreamRef StreamRef, void* FileWatcherP
{
action = FileSystemAction::Create;
}
if (renamed || modified)
if (renamed)
{
action = FileSystemAction::Delete;
action = FileSystemAction::Rename;
}
if (removed)
if (rmodified)
{
action = FileSystemAction::Modify;
}
if (removed)
{
action = FileSystemAction::Delete;
}
const String resolvedPath = AppleUtils::ToString((CFStringRef)CFArrayGetValueAtIndex(EventPathArray,EventIndex));