Check-in [7343126617]
Not logged in
Overview

SHA1 Hash:7343126617842a3b677085b2de78901978147460
Date: 2009-09-11 21:05:51
User: drh
Comment:Fix the "ui"/"server" command for win32 so that it works even if run from cygwin in a directory that contains a space in its name.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/winhttp.c from [2ef98f5c31] to [f308305b21].

@@ -109,15 +109,15 @@
     }
     wanted -= got;
   }
   fclose(out);
   out = 0;
-  sprintf(zCmd, "%s http \"%s\" %s %s %s",
+  sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s",
     g.argv[0], g.zRepositoryName, zRequestFName, zReplyFName,
     inet_ntoa(p->addr.sin_addr)
   );
-  system(zCmd);
+  portable_system(zCmd);
   in = fopen(zReplyFName, "rb");
   if( in ){
     while( (got = fread(zHdr, 1, sizeof(zHdr), in))>0 ){
       send(p->s, zHdr, got, 0);
     }
@@ -177,11 +177,11 @@
   zTempPrefix = mprintf("fossil_server_P%d_", iPort);
   printf("Listening for HTTP requests on TCP port %d\n", iPort);
   if( zBrowser ){
     zBrowser = mprintf(zBrowser, iPort);
     printf("Launch webbrowser: %s\n", zBrowser);
-    system(zBrowser);
+    portable_system(zBrowser);
   }
   printf("Type Ctrl-C to stop the HTTP server\n");
   for(;;){
     SOCKET client;
     SOCKADDR_IN client_addr;