[BROWSEUI] Attempt to parse absolute path even if relative path gets an unexpected...
authorCharles Ambrye <giawa@hotmail.com>
Sun, 19 Apr 2020 05:34:08 +0000 (22:34 -0700)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Mon, 20 Apr 2020 11:12:47 +0000 (14:12 +0300)
Some 'BindToObject' methods are incomplete, and in some cases relative paths are simply not possible (especially in special folders such as the desktop)

dll/win32/browseui/addresseditbox.cpp

index f5748ec..5d96b89 100644 (file)
@@ -146,11 +146,11 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
 
     hr = pbs->GetPidl(&pidlCurrent);
     if (FAILED_UNEXPECTEDLY(hr))
-        goto cleanup;
+        goto parseabsolute;
 
     hr = psfDesktop->BindToObject(pidlCurrent, NULL, IID_PPV_ARG(IShellFolder, &psfCurrent));
     if (FAILED_UNEXPECTEDLY(hr))
-        goto cleanup;
+        goto parseabsolute;
 
     hr = psfCurrent->ParseDisplayName(topLevelWindow, NULL, address, &eaten,  &pidlRelative, &attributes);
     if (SUCCEEDED(hr))
@@ -160,6 +160,7 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
         goto cleanup;
     }
 
+parseabsolute:
     /* We couldn't parse a relative path, attempt to parse an absolute path */
     hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlLastParsed, &attributes);