From: Andrea Faulds <ajf@ajf.me> --- dlls/shell32/shlexec.c | 2 +- dlls/shell32/tests/shlexec.c | 40 +++++++++++++++++------------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index d2a6d5700d4..ff83b66fbb8 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1895,7 +1895,7 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) sei, execfunc ); free( env ); } - else if (PathIsDirectoryW(lpFile)) + else if (!wcsncmp(lpFile, L"::{", 3) || PathIsDirectoryW(lpFile)) { WCHAR wExec[MAX_PATH]; WCHAR * lpQuotedFile = malloc( sizeof(WCHAR) * (lstrlenW(lpFile) + 3) ); diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 3ff9c33a873..9fe1f1f287f 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -3036,31 +3036,29 @@ static void test_directory(void) static void test_guid(void) { - todo_wine { - /* try to open My Computer's shell folder by its GUID */ + /* try to open My Computer's shell folder by its GUID */ - BOOL result; - SHELLEXECUTEINFOW sei = {0}; + BOOL result; + SHELLEXECUTEINFOW sei = {0}; - if (!winetest_interactive) - { - /* This test will open a persistent explorer window for My Computer (if - * one isn't already open), and there's no practical way to consistently - * auto-close it, so this is best left out of the non-interactive tests. - */ - skip( "interactive explorer GUID path test (set WINETEST_INTERACTIVE=1)\n" ); - return; - } + if (!winetest_interactive) + { + /* This test will open a persistent explorer window for My Computer (if + * one isn't already open), and there's no practical way to consistently + * auto-close it, so this is best left out of the non-interactive tests. + */ + skip( "interactive explorer GUID path test (set WINETEST_INTERACTIVE=1)\n" ); + return; + } - sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC | SEE_MASK_FLAG_NO_UI; - sei.lpVerb = L"open"; - sei.lpFile = L"::{20d04fe0-3aea-1069-a2d8-08002b30309d}"; - sei.nShow = SW_SHOW; + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC | SEE_MASK_FLAG_NO_UI; + sei.lpVerb = L"open"; + sei.lpFile = L"::{20d04fe0-3aea-1069-a2d8-08002b30309d}"; + sei.nShow = SW_SHOW; - result = ShellExecuteExW(&sei); - ok(result, "ShellExecuteExW failed\n"); - } + result = ShellExecuteExW(&sei); + ok(result, "ShellExecuteExW failed\n"); } START_TEST(shlexec) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11709