MikoĊ‚aj Zalewski <[EMAIL PROTECTED]> writes:

> @@ -274,11 +274,17 @@ VOID PROGRAM_ExecuteProgram(HLOCAL hProg
>    LPSTR lpszCmdLine = LocalLock(program->hCmdLine);
>    LPSTR lpszWorkDir = LocalLock(program->hWorkDir);
>  
> -  /* FIXME set working directory */
> -  lpszWorkDir = lpszWorkDir;
> +  if (!SetCurrentDirectory(lpszWorkDir))
> +  {
> +    MAIN_MessageBoxIDS_s(IDS_CHDIR_ERROR_s, lpszWorkDir, IDS_ERROR,
> +      MB_ICONEXCLAMATION | MB_OK);
> +    return;
> +  }
>  
>    WinExec(lpszCmdLine, program->nCmdShow);
> -  if (Globals.bMinOnRun) CloseWindow(Globals.hMainWnd);
> +  SetCurrentDirectory(Globals.szWindowsDirectory);
> +  if (Globals.bMinOnRun)
> +    CloseWindow(Globals.hMainWnd);

It would be nicer to call CreateProcess with the correct directory
argument instead of changing the current dir in the parent.

-- 
Alexandre Julliard
[EMAIL PROTECTED]


Reply via email to