mirror of
https://github.com/reactos/reactos.git
synced 2024-10-07 01:44:21 +00:00
fix shortcut icons
svn path=/trunk/; revision=27616
This commit is contained in:
parent
277f2718d0
commit
447975d4e0
|
@ -143,6 +143,7 @@ static BOOL
|
|||
CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nIdTitle, BOOL bCheckExistence)
|
||||
{
|
||||
TCHAR path[MAX_PATH];
|
||||
TCHAR exeName[MAX_PATH];
|
||||
TCHAR title[256];
|
||||
TCHAR name[256];
|
||||
LPTSTR p = path;
|
||||
|
@ -172,7 +173,8 @@ CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nI
|
|||
&lpFilePart);
|
||||
if (dwLen != 0 && dwLen <= sizeof(szWorkingDir) / sizeof(szWorkingDir[0]))
|
||||
{
|
||||
/* Successfully determined the file path */
|
||||
/* Save the file name */
|
||||
_tcscpy(exeName, lpFilePart);
|
||||
|
||||
if (lpFilePart != NULL)
|
||||
{
|
||||
|
@ -209,7 +211,7 @@ CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nI
|
|||
if (!LoadString(hDllInstance, nIdTitle, title, sizeof(title)/sizeof(title[0])))
|
||||
return FALSE;
|
||||
|
||||
return SUCCEEDED(CreateShellLink(path, command, _T(""), lpWorkingDir, NULL, 0, title));
|
||||
return SUCCEEDED(CreateShellLink(path, exeName, _T(""), lpWorkingDir, NULL, 0, title));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue