Fixed a problem where OpenDS couldn't be installed on Windows in a directory with a space in it's path. There was also a similar, but more benign problem with log messages generated from start-ds.bat and stop-ds.bat.
| | |
| | | set DIR_HOME=%~dP0.. |
| | | set INSTANCE_ROOT=%DIR_HOME% |
| | | |
| | | set LOG=%INSTANCE_ROOT%\logs\native-windows.out |
| | | set LOG="%INSTANCE_ROOT%\logs\native-windows.out" |
| | | set SCRIPT=start-ds.bat |
| | | |
| | | echo %SCRIPT%: invoked >> %LOG% |
| | |
| | | |
| | | set INSTANCE_ROOT=%DIR_HOME% |
| | | |
| | | set LOG=%INSTANCE_ROOT%\logs\native-windows.out |
| | | set LOG="%INSTANCE_ROOT%\logs\native-windows.out" |
| | | set SCRIPT=stop-ds.bat |
| | | |
| | | rem This is the template to use for logging. Make sure to use >> |
| | |
| | | STARTUPINFO startInfo; // info to pass to the new process |
| | | DWORD processFlag; // background process flag |
| | | |
| | | debug("Attempting to child process '%s' background=%d.", command, background); |
| | | debug("Attempting to create child process '%s' background=%d.", command, background); |
| | | |
| | | // reset process info first |
| | | ZeroMemory(procInfo, sizeof(PROCESS_INFORMATION)); |
| | |
| | | } |
| | | else |
| | | { |
| | | if ((strlen(fileName) + strlen(" start ") + strlen(_instanceDir) + strlen("\"\"")) |
| | | if ((strlen(fileName) + strlen(" start ") + strlen(_instanceDir) + 2 * strlen("\"\"")) |
| | | < COMMAND_SIZE) |
| | | { |
| | | sprintf(serviceBinPath, "%s start \"%s\"", fileName, |
| | | sprintf(serviceBinPath, "\"%s\" start \"%s\"", fileName, |
| | | _instanceDir); |
| | | } |
| | | else |