Module: wine Branch: master Commit: 9ae17687c0654e89b702c4b7bc7a2e93f85321d4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ae17687c0654e89b702c4b7bc...
Author: Huw Davies huw@codeweavers.com Date: Wed Feb 8 16:52:17 2012 +0000
shell32: Don't try to check for the folder's existence if we don't have a path.
---
dlls/shell32/shellpath.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 8c66646..16ca6a3 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3544,6 +3544,8 @@ static HRESULT get_known_folder_path_by_id( else hr = SHGetKnownFolderPath( folderId, dwFlags, NULL, ppszPath );
+ if (FAILED(hr)) return hr; + /* check if known folder really exists */ dwAttributes = GetFileAttributesW(*ppszPath); if(dwAttributes == INVALID_FILE_ATTRIBUTES || !(dwAttributes & FILE_ATTRIBUTE_DIRECTORY) )