From d0e7a5ecacc8692b533c8102bfa6b2267f309ab9 Mon Sep 17 00:00:00 2001 From: François Revel Date: Tue, 26 Apr 2011 22:40:17 +0000 Subject: Skip command line arguments starting with - (including the annoying -psn_0_... one when launched from Finder). svn path=/trunk/netsurf/; revision=12242 --- cocoa/NetsurfApp.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cocoa') diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 399ea11d1..8897eb4b4 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -182,6 +182,9 @@ int main( int argc, char **argv ) NSApplication *app = cocoa_prepare_app(); for (int i = 1; i < argc; i++) { + /* skip -psn_* and other possible options */ + if (argv[i][0] == '-') + continue; browser_window_create( argv[i], NULL, NULL, true, false ); } -- cgit v1.2.3