macOS: only read file urls for new-terminal services (#13169)

macOS is already guarding this in Services settings, but guarding what
we actually need anyway
This commit is contained in:
Mitchell Hashimoto
2026-07-05 13:50:34 -07:00
committed by GitHub

View File

@@ -33,7 +33,7 @@ class ServiceProvider: NSObject {
) {
guard let delegate = NSApp.delegate as? AppDelegate else { return }
guard let pathURLs = pasteboard.readObjects(forClasses: [NSURL.self]) as? [URL] else {
guard let pathURLs = pasteboard.readObjects(forClasses: [NSURL.self], options: [.urlReadingFileURLsOnly: true]) as? [URL] else {
error.pointee = Self.errorNoString
return
}