Author: tkreuzer Date: Fri Sep 17 19:00:12 2010 New Revision: 48792
URL: http://svn.reactos.org/svn/reactos?rev=48792&view=rev Log: [SHELL32] Johannes Anderwald: - Partly revert 48786 - Use existing sLinkPath instead of own grown sCurFile - Fixes 6 more winetest failures, 4 to go for shellink test
Modified: trunk/reactos/dll/win32/shell32/shelllink.c
Modified: trunk/reactos/dll/win32/shell32/shelllink.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelllink... ============================================================================== --- trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] Fri Sep 17 19:00:12 2010 @@ -443,14 +443,14 @@
if( SUCCEEDED( r ) ) { - if ( This->sCurFile ) + if ( This->sLinkPath ) { - HeapFree(GetProcessHeap(), 0, This->sCurFile); + HeapFree(GetProcessHeap(), 0, This->sLinkPath); } - This->sCurFile = HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); - if ( This->sCurFile ) + This->sLinkPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); + if ( This->sLinkPath ) { - wcscpy(This->sCurFile, pszFileName); + wcscpy(This->sLinkPath, pszFileName); }
StartLinkProcessor( pszFileName ); @@ -480,13 +480,13 @@
*ppszFileName = NULL;
- if ( !This->sCurFile) + if ( !This->sLinkPath) { /* IPersistFile::GetCurFile called before IPersistFile::Save */ return S_FALSE; }
- *ppszFileName = CoTaskMemAlloc((wcslen(This->sCurFile)+1) * sizeof(WCHAR)); + *ppszFileName = CoTaskMemAlloc((wcslen(This->sLinkPath)+1) * sizeof(WCHAR)); if (!*ppszFileName) { /* out of memory */ @@ -494,7 +494,7 @@ }
/* copy last saved filename */ - wcscpy(*ppszFileName, This->sCurFile); + wcscpy(*ppszFileName, This->sLinkPath);
return NOERROR; }