[PATCH 4/5] shell32: Fall back on CSIDL path for knownfolders without a path in the registry

Andrew Eikum aeikum at codeweavers.com
Mon Mar 2 09:28:55 CST 2015


---
 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





More information about the wine-patches mailing list