From: Andrew Eikum Subject: [PATCH 4/5] shell32: Fall back on CSIDL path for knownfolders without a path in the registry Message-Id: <20150302152855.GH2076@foghorn.codeweavers.com> Date: Mon, 2 Mar 2015 09:28:55 -0600 --- dlls/shell32/shellpath.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 493ab8b..84e663b 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3589,7 +3589,7 @@ static HRESULT get_known_folder_path_by_id( DWORD dwFlags, LPWSTR *ppszPath) { - HRESULT hr; + HRESULT hr = E_FAIL; WCHAR sGuid[39]; DWORD dwAttributes; @@ -3603,7 +3603,8 @@ static HRESULT get_known_folder_path_by_id( hr = get_known_folder_path(sGuid, lpRegistryPath, ppszPath); } /* in other case, use older way */ - else + + if(FAILED(hr)) hr = SHGetKnownFolderPath( folderId, dwFlags, NULL, ppszPath ); if (FAILED(hr)) return hr; -- 2.3.1