{
if(watchFor & action)
{
- fileNotifies.Add(FileNotify {
+ fileNotifies.Add(FileNotify {
monitor = this, action = action, fileName = CopyString(fileName), param = CopyString(param)
});
return true;
return 1;
else if(e1.attribs.isDirectory && !e2.attribs.isDirectory)
return -1;
- else
+ else
return strcmp(e1.name, e2.name);
}
bool fileActivity = false;
lastTime = currentTime;
- // printf("[%d] Waiting in MonitorThread for fileMonitor Mutex %x...\n", GetCurrentThreadID(), globalSystem.fileMonitorMutex);
+ // printf("[%d] Waiting in MonitorThread for fileMonitor Mutex %x...\n", (int)GetCurrentThreadID(), globalSystem.fileMonitorMutex);
globalSystem.fileMonitorMutex.Wait();
for(monitor = globalSystem.fileMonitors.first; monitor; monitor = monitor.next)
}
monitor.files.Free(FileEntry::Free);
monitor.files = newEntries;
- }
+ }
}
else if(monitor.fileName)
{
{
fileActivity |= monitor.AddFileNotify(FileChange { deleted = true }, monitor.fileName, null);
monitor.exists = false;
- }
+ }
else if(monitor.exists)
{
FileStats stats { };
}
if(fileActivity)
{
- // printf("[%d] Signaling Event...\n", GetCurrentThreadID());
+ // printf("[%d] Signaling Event...\n", (int)GetCurrentThreadID());
guiApp.SignalEvent();
}
- // printf("[%d] Releasing Mutex...\n", GetCurrentThreadID());
+ // printf("[%d] Releasing Mutex...\n", (int)GetCurrentThreadID());
globalSystem.fileMonitorMutex.Release();
}
-
- // printf("[%d] Sleeping...\n", GetCurrentThreadID());
+
+ // printf("[%d] Sleeping...\n", (int)GetCurrentThreadID());
Sleep(1.0 / 18.2);
}
return 0;