Replace now deprecated FSEventStreamScheduleWithRunLoop with FSEventStreamSetDispatch...
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 13 Dec 2022 12:40:57 +0000 (13:40 +0100)
committerClaudio Cambra <claudio.cambra@gmail.com>
Mon, 2 Jan 2023 17:05:54 +0000 (18:05 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/folderwatcher_mac.cpp

index 988d20377f51a01fe748c674b36393857ddea565..fcce031cdaf66a215ea56eb416ba0685f3daabeb 100644 (file)
@@ -101,7 +101,7 @@ void FolderWatcherPrivate::startWatching()
 
     CFRelease(pathsToWatch);
     CFRelease(folderCF);
-    FSEventStreamScheduleWithRunLoop(_stream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+    FSEventStreamSetDispatchQueue(_stream, dispatch_get_main_queue());
     FSEventStreamStart(_stream);
 }