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

  • From: Bastien Chevreux <bach@xxxxxxxxxxxx>
  • To: mira_talk@xxxxxxxxxxxxx
  • Date: Tue, 18 Feb 2014 08:54:59 +0100

On 18 Feb 2014, at 1:00 , Sidney Markowitz <sidney@xxxxxxxxxxxxxx> wrote:
>> Workaround is quite simple: do not use spaces in the path to MIRA.
> 
> I've got a use case where that is difficult - I'm creating a wrapper that
> itself shells out to command line MIRA that allows a user to install it as a
> plugin alongside other tools. On a Mac in particular the natural directory for
> it to be installed is under "/Library/Application Support/“.

Argh! Frak … Mac. And a valid use case, too. I would’ve walked John’s name and 
shame path here, but ...

> If I came up with a patch that fixes this would you consider it for inclusion?

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.

B.


--
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: