Commit 0b5cc286 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

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()).
parent 2b7ae268
......@@ -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;
......
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment