Overview
Artifact ID: | 26786ea777c8676980751c33753f50bf6ca398c8 |
---|---|
Ticket: | 40df1ced7ebd6a8b9e419ff1a788ce05e33a82e1
Sync fail/crash with file: URL on Win32 |
User & Date: | anonymous 2009-06-24 12:53:43 |
Changes
- Appended to comment:
<hr><i>anonymous claiming to be Twylite added on 2009-06-24 12:53:43:</i><br> I think I posted that patch as 'pre' instead of 'verbatim'. To safe a lot of frustration if you didn't notice the <nowiki>[bad-link:0]</nowiki> in there, here's a better copy: <verbatim> --- src/http_transport.c +++ src/http_transport.c @@ -140,14 +140,21 @@ /* ** This routine is called when the outbound message is complete and ** it is time to being recieving a reply. */ void transport_flip(void){ +#ifdef __MINGW32__ + /* If a command begins with a quote, cmd.exe will strip the leading char + * and the last quote char on the line. See 'cmd /?' */ + char* cmdformat = "\"\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1\""; +#else + char* cmdformat = "\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1"; +#endif if( g.urlIsFile ){ char *zCmd; fclose(transport.pFile); - zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1", + zCmd = mprintf(cmdformat, g.argv[0], g.urlName, transport.zOutFile, transport.zInFile ); system(zCmd); free(zCmd); transport.pFile = fopen(transport.zInFile, "rb"); </verbatim>