On 21 December 2015 at 23:50, Gilboa Davara <gilb...@gmail.com> wrote: > On Fri, Dec 11, 2015 at 10:31 PM, Kai Willadsen <kai.willad...@gmail.com> > wrote: >> On 11 December 2015 at 00:48, Gilboa Davara <gilb...@gmail.com> wrote: >>> The issue is indeed MSys2 related. >>> For some odd reason, Meld *always* gets itself (...) as the first >>> command line parameter (argv[1]). >> >> What's argv[0] in this case? python? >> >> I can't find any indication that this is how msys is supposed to work. >> It would be good to know whether we're doing something to mess it up, >> or whether it's doing odd things. If this is reliable and detectable >> behaviour then I'm not above adding a hack for it to the launcher >> script, but obviously it would be better not to. >> >> cheers, >> Kai > > Sorry for the late reply. > I somehow missed your message. > > Something is seriously weird here. > I added prints to main, and the sys.argv seems valid. > > Logging code: > > +print("ArgV size: " + str(len(sys.argv))) > +print("ArgV0: \"" + sys.argv[0] + "\"") > +print("ArgV1: \"" + sys.argv[1] + "\"") > > Output: > > trunk $ /mingw64/bin/meld . > Couldn't bind the translation domain. Some translations won't work. > [Error 126] The specified module could not be found > ArgV size: 2 > ArgV0: "C:/Applications/Development/MSys64/mingw64/bin/meld" > ArgV1: "."
Alright this seems pretty odd. It's possible that our optparse.OptionParser subclass is causing something weird to happen, or conceivably GTK+ isn't passing along the command line as we'd expect. If you're still looking at this, I'd suggest adding some debugging to MeldApp.parse_args() to see whether command_line is sane, and whether something odd is happening when we actually parse. Specifically, we do: rawargs = command_line.get_arguments()[1:] and then: options, args = parser.parse_args(rawargs) both of which *could* be doing unexpected things. cheers, Kai _______________________________________________ meld-list mailing list meld-list@gnome.org https://mail.gnome.org/mailman/listinfo/meld-list