Skip to content
Snippets Groups Projects
Commit 19ef7a0f authored by Shelley Vohr's avatar Shelley Vohr Committed by Cheng Zhao
Browse files

fix: don't fallback to OpenFolderViaShell (#21668)

parent c0bde4ba
No related merge requests found
......@@ -272,19 +272,15 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) {
hr = desktop->ParseDisplayName(NULL, NULL,
const_cast<wchar_t*>(dir.value().c_str()),
NULL, &dir_item, NULL);
if (FAILED(hr)) {
ui::win::OpenFolderViaShell(dir);
if (FAILED(hr))
return;
}
base::win::ScopedCoMem<ITEMIDLIST> file_item;
hr = desktop->ParseDisplayName(
NULL, NULL, const_cast<wchar_t*>(full_path.value().c_str()), NULL,
&file_item, NULL);
if (FAILED(hr)) {
ui::win::OpenFolderViaShell(dir);
if (FAILED(hr))
return;
}
const ITEMIDLIST* highlight[] = {file_item};
hr = SHOpenFolderAndSelectItems(dir_item, base::size(highlight), highlight,
......@@ -299,7 +295,6 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) {
LOG(WARNING) << " " << __func__ << "(): Can't open full_path = \""
<< full_path.value() << "\""
<< " hr = " << logging::SystemErrorCodeToString(hr);
ui::win::OpenFolderViaShell(dir);
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment