[mira_talk] Re: Bug when the mira executable is in a directory with a space character in the name

  • From: Sidney Markowitz <sidney@xxxxxxxxxxxxxx>
  • To: mira_talk@xxxxxxxxxxxxx
  • Date: Tue, 18 Feb 2014 22:33:49 +1300

Bastien Chevreux wrote, On 2/18/14 8:54 PM:
> I did not think of quotes (thanks, John), so maybe, just maybe, the patch is 
> trivial. Can you please test the following:
> 
>  in src/utils/fileanddisk.C toward the end of "void 
> findLocationOfSelfBinary(string & location)”, you will find
> 
>   location=bpath.native();
> 
> Change to
> 
>   location=‘“'+bpath.native()+’"';
> 
> Not pretty, but if that works for you I’ll take care to get quotes added 
> properly.

That's exactly what I was going to suggest. I already tried it on Linux by
changing mod_mira.C line 262, but that's the same effect as your change, and
it worked fine. I have not succeeded yet in building MIRA on a Mac - I'm doing
something wrong with those complicated build steps - but this is just an issue
of bash which is the same on Mac and Linux, so I am confident it would work.

This will break if the user does something really pathological like install
the MIRA executable in a directory path that contains " or $ or maybe some
other special characters, but I would not consider that a reasonable use case.

Thank you so much,

 Sidney

-- 
You have received this mail because you are subscribed to the mira_talk mailing 
list. For information on how to subscribe or unsubscribe, please visit 
http://www.chevreux.org/mira_mailinglists.html

Other related posts: