Index: PCbuild/make_buildinfo.c =================================================================== --- PCbuild/make_buildinfo.c (revision 88219) +++ PCbuild/make_buildinfo.c (working copy) @@ -42,19 +42,20 @@ RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS) /* Tortoise not installed */ return 0; - command[0] = '"'; /* quote the path to the executable */ - size = sizeof(command) - 1; - if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS || + /* quote paths and whole command, so begin and end with two quote characters. */ + command[0] = command[1] = '"'; + size = sizeof(command) - 2; + if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+2, &size) != ERROR_SUCCESS || type != REG_SZ) /* Registry corrupted */ return 0; strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe"); - if (_stat(command+1, &st) < 0) + if (_stat(command+2, &st) < 0) /* subwcrev.exe not part of the release */ return 0; strcat_s(command, CMD_SIZE, "\" .. ..\\Modules\\getbuildinfo.c \""); - strcat_s(command, CMD_SIZE, tmppath); /* quoted tmppath */ - strcat_s(command, CMD_SIZE, "getbuildinfo2.c\""); + strcat_s(command, CMD_SIZE, tmppath); + strcat_s(command, CMD_SIZE, "getbuildinfo2.c\"\""); puts(command); fflush(stdout); if (system(command) < 0) return 0;