shell32: Don't try to check for the folder's existence if we don't have a path.

This commit is contained in:
Huw Davies 2012-02-08 16:52:17 +00:00 committed by Alexandre Julliard
parent 8272045cd8
commit 9ae17687c0
1 changed files with 2 additions and 0 deletions

View File

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