[Github-comments] [geany] Alter spawn to return the error message only in error->message (#701)

zhekov notifications at xxxxx
Fri Oct 30 17:28:42 UTC 2015


>  		{
> -			ui_set_statusbar(TRUE, "Context action command failed: %s", error->message);
> +			ui_set_statusbar(TRUE, format, command, error->message);

Actually, it occurred to me a few days ago that not caring about %s is wrong, but I was  too busy setting up my new computer...

A %s with a selection containing any quotes may break the command parsing under *unix. Thus we'd better display the short version on G_SPAWN_ERROR, and the long version on G_SHELL_ERROR (== parse error). Of course, it may break the spawning too, if %s is at the start of the command, but that's a bit extreme.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/701/files#r43529283
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151030/32ce0cd2/attachment.html>


More information about the Github-comments mailing list