Commit 383de6ef authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Make sure exePath contains the path since it is used later in the

function as well.
parent 9f6f7cc7
......@@ -678,22 +678,19 @@ static HRESULT WINAPI IPersistStream_fnSave(
*exePath = '\0';
if (This->sPath)
SHELL_FindExecutable(NULL, This->sPath, wOpen, exePath, MAX_PATH, NULL, NULL, NULL, NULL);
/* if there's no PIDL, generate one */
if( ! This->pPidl )
{
SHELL_FindExecutable(NULL, This->sPath, wOpen, exePath, MAX_PATH, NULL, NULL, NULL, NULL);
/*
* windows can create lnk files to executables that do not exist yet
* so if the executable does not exist the just trust the path they
* gave us
*/
if( !*exePath )
This->pPidl = ILCreateFromPathW(This->sPath);
else
This->pPidl = ILCreateFromPathW(exePath);
if( !*exePath ) strcpyW(exePath,This->sPath);
}
/* if there's no PIDL, generate one */
if( ! This->pPidl ) This->pPidl = ILCreateFromPathW(exePath);
memset(&header, 0, sizeof(header));
header.dwSize = sizeof(header);
memcpy(&header.MagicGuid, &CLSID_ShellLink, sizeof(header.MagicGuid) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment