summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-09-13 19:55:15 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-09-13 19:55:15 +0200
commitddd3ade02309259cda20de14bdeef334a006ad1f (patch)
treebf078aee15965dd7bf76d7e0a01e0b2646df623e
parentfe7fed590aa3aa5f981c6fbae7cd1689da1cad09 (diff)
downloadmpv-ddd3ade02309259cda20de14bdeef334a006ad1f.tar.bz2
mpv-ddd3ade02309259cda20de14bdeef334a006ad1f.tar.xz
macosx_application: fix file opening on 10.9 (for real this time)
I did commit 86c05655d by thinking `mpv` already removed the `mpv` from argc/argv. It actually is still there, so the argc must be 1 to check for no arguments. Thanks to @Nyx0uf for pointing out the bug and for testing on 10.9!
-rw-r--r--osdep/macosx_application.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index c292c1fd53..b03e1731f5 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -429,7 +429,7 @@ static bool bundle_started_from_finder(int argc, char **argv)
{
bool bundle_detected = [[NSBundle mainBundle] bundleIdentifier];
bool pre_mavericks_args = argc==2 && psn_matches_current_process(argv[1]);
- bool post_mavericks_args = argc==0;
+ bool post_mavericks_args = argc==1;
return bundle_detected && (pre_mavericks_args || post_mavericks_args);
}