Re: Anjuta freeze break request


Le 26/03/2011 18:54, Matthias Clasen a écrit :
Patch looks somewhat half-baked to me, though I may just not know the

It's a half-backed quick fix, it would be useful to have something better.

what if the root is e.g. "my-install-c". Maybe that is not
possible, but just checking that the last 2 characters are "-c" looks
almost certain to cause some followup bug somewhere down the road...

Currently root is a prefix that you add before the "make install" command line. In the UI it's selectable with a combo box, so you have only 3 choices:
  ""	(nothing)
  "su -c"

You need to quote the "make install" command only in the last case, after "su -c".

Using gconf-editor, it's possible to set any value here that's why I have checked for "-c", hoping that another unknown command will use "-c" argument if it needs the quoted command line too. I can check for an additional space before the "-c" to avoid the case you give.

I think a better solution would be to use a format string. Something like "sudo %c" and "su -c %q" with %c meaning the not quoted command and %q the quoted command. But, it's more complex and I'm not sure it worths it now.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]