Skip to content

Commit 3c7fb11

Browse files
committed
Fix build issue on swift 5.5
1 parent f1168b8 commit 3c7fb11

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

MenuHelperExtension/FinderSync.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)