File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,15 @@ class FinderSync: FIFinderSync {
2222 logger. notice ( " FinderSync() launched from \( Bundle . main. bundlePath, privacy: . public) " )
2323 FIFinderSyncController . default ( ) . directoryURLs = Set ( folderStore. syncItems. map { URL ( fileURLWithPath: $0. path) } )
2424 logger. notice ( " Init sync directory is \( folderStore. syncItems. map ( \. path) . joined ( separator: " \n " ) , privacy: . public) " )
25-
25+
2626 // Monitor volumes
2727 NSWorkspace . shared. notificationCenter. addObserver ( forName: NSWorkspace . didMountNotification, object: nil , queue: . main) { notification in
2828 if let volumeURL = notification. userInfo ? [ NSWorkspace . volumeURLUserInfoKey] as? URL {
29- folderStore. appendItem ( SyncFolderItem ( volumeURL) )
29+ Task {
30+ await MainActor . run {
31+ folderStore. appendItem ( SyncFolderItem ( volumeURL) )
32+ }
33+ }
3034 }
3135 }
3236 }
You can’t perform that action at this time.
0 commit comments