Skip to content

Commit

Permalink
Fix crash accepting filenames from dock drop
Browse files Browse the repository at this point in the history
We take URLs, not Strings. Fix the header to be explicit, and don't map.

Fixes the crash in GH-184.
  • Loading branch information
NattyNarwhal committed Dec 31, 2023
1 parent bb4af08 commit 46f38a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Submariner/SBAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fileprivate let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, catego
}

func application(_ application: NSApplication, open urls: [URL]) {
databaseController.openImportAlert(databaseController.window, files: urls.map { $0.path })
databaseController.openImportAlert(databaseController.window, files: urls)
}

// #MARK: - Application Files/Directories
Expand Down
2 changes: 1 addition & 1 deletion Submariner/SBDatabaseController.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
@property (readonly, strong) IBOutlet NSNumber *isServerUsersShown;
@property (readonly, strong) IBOutlet NSNumber *isInspectorShown;

- (BOOL)openImportAlert:(NSWindow *)sender files:(NSArray *)files;
- (BOOL)openImportAlert:(NSWindow *)sender files:(NSArray<NSURL*> *)files;

- (void)goToTrack: (SBTrack*)track;

Expand Down

0 comments on commit 46f38a0

Please sign in to comment.