From: Adam Dickmeiss Date: Fri, 6 Mar 2009 14:34:48 +0000 (+0100) Subject: Fixed args passing with blanks for Windows Service X-Git-Tag: v3.0.45~17 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=4efb9de61a4284830d3dde10a992a42067879c84;p=yaz-moved-to-github.git Fixed args passing with blanks for Windows Service --- diff --git a/src/sc.c b/src/sc.c index 277b8d9..e0c1ec1 100644 --- a/src/sc.c +++ b/src/sc.c @@ -268,7 +268,11 @@ int yaz_sc_program(yaz_sc_t s, int argc, char **argv, for (i = 1; i < argc; i++) { wrbuf_puts(w, " "); + if (strchr(argv[i], ' ')) + wrbuf_puts(w, "\""); wrbuf_puts(w, argv[i]); + if (strchr(argv[i], ' ')) + wrbuf_puts(w, "\""); } wrbuf_puts(w, " -run \""); wrbuf_puts(w, cwdstr);