Skip to content

Commit

Permalink
Fix build issue on swift 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Jun 30, 2022
1 parent f1168b8 commit 3c7fb11
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions MenuHelperExtension/FinderSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ class FinderSync: FIFinderSync {
logger.notice("FinderSync() launched from \(Bundle.main.bundlePath, privacy: .public)")
FIFinderSyncController.default().directoryURLs = Set(folderStore.syncItems.map { URL(fileURLWithPath: $0.path) })
logger.notice("Init sync directory is \(folderStore.syncItems.map(\.path).joined(separator: "\n"), privacy: .public)")

// Monitor volumes
NSWorkspace.shared.notificationCenter.addObserver(forName: NSWorkspace.didMountNotification, object: nil, queue: .main) { notification in
if let volumeURL = notification.userInfo?[NSWorkspace.volumeURLUserInfoKey] as? URL {
folderStore.appendItem(SyncFolderItem(volumeURL))
Task {
await MainActor.run {
folderStore.appendItem(SyncFolderItem(volumeURL))
}
}
}
}
}
Expand Down

0 comments on commit 3c7fb11

Please sign in to comment.