mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 15:18:30 +00:00
- Fix bug with incorrect a working directory. Patch by Evgeny Boltik (bstsoft@narod.ru) with my small changes
See issue #4006 for more details. svn path=/trunk/; revision=38640
This commit is contained in:
parent
c060461efd
commit
73b2556b86
1 changed files with 7 additions and 1 deletions
|
@ -1186,6 +1186,8 @@ DoCreateLink(
|
|||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
WCHAR szTarget[MAX_PATH] = {0};
|
||||
WCHAR szDirPath[MAX_PATH];
|
||||
LPWSTR pszFile;
|
||||
STRRET strFile;
|
||||
LPWSTR pszExt;
|
||||
HRESULT hr;
|
||||
|
@ -1230,7 +1232,11 @@ DoCreateLink(
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(IShellLinkW_SetPath(nLink, szPath)))
|
||||
GetFullPathName(szPath, MAX_PATH, szDirPath, &pszFile);
|
||||
if (pszFile) pszFile[0] = 0;
|
||||
|
||||
if (SUCCEEDED(IShellLinkW_SetPath(nLink, szPath)) &&
|
||||
SUCCEEDED(IShellLinkW_SetWorkingDirectory(nLink, szDirPath)))
|
||||
{
|
||||
if (SUCCEEDED(IShellLinkW_QueryInterface(nLink, &IID_IPersistFile, (LPVOID*)&ipf)))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue