RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)\r
/* Tortoise not installed */\r
return 0;\r
- size = sizeof(command);\r
- if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command, &size) != ERROR_SUCCESS ||\r
+ command[0] = '"'; /* quote the path to the executable */\r
+ size = sizeof(command) - 1;\r
+ if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||\r
type != REG_SZ)\r
/* Registry corrupted */\r
return 0;\r
- strcat(command, "bin\\subwcrev.exe");\r
+ strcat(command, "bin\\subwcrev.exe\"");\r
if (_stat(command, &st) < 0)\r
/* subwcrev.exe not part of the release */\r
return 0;\r