diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 5f99c9da9b8..62fc3e5dfeb 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -1048,10 +1048,7 @@ static HRESULT WINAPI IPersistStream_fnSave( IStream* stm, BOOL fClearDirty) { - static const WCHAR wOpen[] = {'o','p','e','n',0}; - LINK_HEADER header; - WCHAR exePath[MAX_PATH]; ULONG count; DWORD zero; HRESULT r; @@ -1060,20 +1057,6 @@ static HRESULT WINAPI IPersistStream_fnSave( TRACE("%p %p %x\n", This, stm, fClearDirty); - *exePath = '\0'; - - if (This->sPath) - { - 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) lstrcpyW(exePath,This->sPath); - } - memset(&header, 0, sizeof(header)); header.dwSize = sizeof(header); header.fStartup = This->iShowCmd; @@ -1125,7 +1108,7 @@ static HRESULT WINAPI IPersistStream_fnSave( } if( This->sPath ) - Stream_WriteLocationInfo( stm, exePath, &This->volume ); + Stream_WriteLocationInfo( stm, This->sPath, &This->volume ); if( This->sDescription ) r = Stream_WriteString( stm, This->sDescription ); diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 237ce8fbf24..8db88bb1e74 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -586,7 +586,7 @@ static void test_load_save(void) desc.icon_id=0; desc.hotkey=0x1234; create_lnk(lnkfile, &desc, 0); - check_lnk(lnkfile, &desc, 0x4); + check_lnk(lnkfile, &desc, 0x0); r = DeleteFileA(mypath); ok(r, "failed to delete file %s (%d)\n", mypath, GetLastError());