mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[SYSSETUP]
* Use the right function for the fix. svn path=/branches/shell-experiments/; revision=65394
This commit is contained in:
parent
70bd9e70f3
commit
4b0ff82950
1 changed files with 1 additions and 13 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue