summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macosx_finder_args.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/osdep/macosx_finder_args.m b/osdep/macosx_finder_args.m
index fcdef4b494..56d314c100 100644
--- a/osdep/macosx_finder_args.m
+++ b/osdep/macosx_finder_args.m
@@ -36,8 +36,10 @@ bool psn_matches_current_process(char *psn_arg_to_check);
@implementation FileOpenDelegate
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
{
+ NSArray *sorted_filenames = [filenames
+ sortedArrayUsingSelector:@selector(compare:)];
files = talloc_zero(NULL, struct playlist);
- for (NSString *filename in filenames)
+ for (NSString *filename in sorted_filenames)
playlist_add_file(files, [filename UTF8String]);
[NSApp stop:nil]; // stop the runloop (give back control to mplayer2 code)
}