From 4b0ff8295028342dcca01bd56442b7932e5f7148 Mon Sep 17 00:00:00 2001 From: David Quintana Date: Thu, 13 Nov 2014 17:11:07 +0000 Subject: [PATCH] [SYSSETUP] * Use the right function for the fix. svn path=/branches/shell-experiments/; revision=65394 --- dll/win32/syssetup/install.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/dll/win32/syssetup/install.c b/dll/win32/syssetup/install.c index 7b7d19c9d54..1cd35ad250e 100644 --- a/dll/win32/syssetup/install.c +++ b/dll/win32/syssetup/install.c @@ -241,7 +241,6 @@ static BOOL CreateShortcuts(HINF hinf, LPCWSTR szSection) WCHAR szFolder[MAX_PATH]; WCHAR szFolderSection[MAX_PATH]; INT csidl; - LPWSTR p; CoInitialize(NULL); @@ -262,20 +261,9 @@ static BOOL CreateShortcuts(HINF hinf, LPCWSTR szSection) if (!SetupGetStringFieldW(&Context, 2, szFolder, MAX_PATH, NULL)) continue; - if (FAILED(SHGetFolderPathW(NULL, csidl|CSIDL_FLAG_CREATE, (HANDLE)-1, SHGFP_TYPE_DEFAULT, szPath))) + if (FAILED(SHGetFolderPathAndSubDirW(NULL, csidl|CSIDL_FLAG_CREATE, (HANDLE)-1, SHGFP_TYPE_DEFAULT, szFolder, szPath))) continue; - p = PathAddBackslash(szPath); - _tcscpy(p, szFolder); - - if (!CreateDirectory(szPath, NULL)) - { - if (GetLastError() != ERROR_ALREADY_EXISTS) - { - continue; - } - } - CreateShortcutsFromSection(hinf, szFolderSection, szPath); }while (SetupFindNextLine(&Context, &Context));