From df6ed2f4e8cadf4e4c69b879cbe9ca2fbc19e02a Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 11 Aug 2005 17:04:31 +0000 Subject: [PATCH] Fix the return value of SHELL_Argify() so it once again returns true if a '%1' or equivalent placeholder was found. This fixes ShellExecuteEx(lpFile="foo.txt", lpClass="txtfile"). --- dlls/shell32/shlexec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 675513fdd8..5ff0c1d819 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -82,6 +82,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp { WCHAR xlpFile[1024]; BOOL done = FALSE; + BOOL found_p1 = FALSE; PWSTR res = out; PCWSTR cmd; LPVOID pv; @@ -155,6 +156,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp res += strlenW(cmd); } } + found_p1 = TRUE; break; /* @@ -168,6 +170,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp strcpyW(res, lpFile); res += strlenW(lpFile); } + found_p1 = TRUE; break; case 'i': @@ -178,6 +181,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp res += sprintfW(res, wszILPtr, pv); SHUnlockShared(pv); } + found_p1 = TRUE; break; default: @@ -221,7 +225,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp *res = '\0'; - return done; + return found_p1; } HRESULT SHELL_GetPathFromIDListForExecuteA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize)