Fix ShellExecute("\"foo.doc\"") for Internet Explorer 6.

Update the conformance tests accordingly.
Tweak a trace because it's very confusing to see the path with no
escaped quotes in ShellExecuteA() and then with escaped quotes in
ShellExecuteExW32() (due to debugstr_w()).
This commit is contained in:
Francois Gouget 2005-08-17 09:53:30 +00:00 committed by Alexandre Julliard
parent 2b7ae268e5
commit 0b5cc286e3
2 changed files with 14 additions and 8 deletions

View file

@ -1008,10 +1008,19 @@ BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfun
sei->hProcess = NULL;
/* make copies of all path/command strings */
if (sei_tmp.lpFile)
strcpyW(wszApplicationName, sei_tmp.lpFile);
if (!sei_tmp.lpFile)
*wszApplicationName = '\0';
else if (*sei_tmp.lpFile == '\"')
{
UINT l;
strcpyW(wszApplicationName, sei_tmp.lpFile+1);
l=lstrlenW(wszApplicationName);
if (wszApplicationName[l-1] == '\"')
wszApplicationName[l-1] = '\0';
TRACE("wszApplicationName=%s\n",debugstr_w(wszApplicationName));
}
else
*wszApplicationName = '\0';
strcpyW(wszApplicationName, sei_tmp.lpFile);
if (sei_tmp.lpParameters)
strcpyW(wszParameters, sei_tmp.lpParameters);
@ -1353,7 +1362,8 @@ HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile,
HANDLE hProcess = 0;
TRACE("%p,%s,%s,%s,%s,%d\n",
hWnd, lpOperation, lpFile, lpParameters, lpDirectory, iShowCmd);
hWnd, debugstr_a(lpOperation), debugstr_a(lpFile),
debugstr_a(lpParameters), debugstr_a(lpDirectory), iShowCmd);
sei.cbSize = sizeof(sei);
sei.fMask = 0;

View file

@ -577,14 +577,10 @@ static void test_filename()
rc=shell_execute(NULL, filename, NULL, NULL);
ok(rc>=32, "%s failed: rc=%d err=%ld\n", shell_call, rc,
GetLastError());
todo_wine {
okChildInt("argcA", 5);
}
okChildString("argvA3", "Open");
sprintf(filename, "%s\\test file.shlexec", tmpdir);
todo_wine {
okChildPath("argvA4", filename);
}
}
}