From 8515852efc5296f3e0e3e8cdcd01d619b7ae1a44 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 9 Jan 2019 14:09:08 +0100 Subject: [PATCH] Ignore the extra "Process Serial Number" parameter generated by the OSX finder https://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder --- src/libslic3r/Config.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index c9fbe90ace..6f22ba89e8 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -561,6 +561,12 @@ bool DynamicConfig::read_cli(int argc, char** argv, t_config_option_keys* extra) extra->push_back(token); continue; } +#ifdef __APPLE__ + if (boost::starts_with(token, "-psn_")) + // OSX launcher may add a "process serial number", for example "-psn_0_989382" to the command line. + // While it is supposed to be dropped since OSX 10.9, we will rather ignore it. + continue; +#endif /* __APPLE__ */ // Stop parsing tokens as options when -- is supplied. if (token == "--") { parse_options = false;