From 19ef7a0fc97cba575e64ccb47bbfc566f0c46fcb Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Sun, 12 Jan 2020 16:49:51 -0800 Subject: [PATCH] fix: don't fallback to OpenFolderViaShell (#21668) --- shell/common/platform_util_win.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index 5a606fbc4b4a..02dd3ad79076 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -272,19 +272,15 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) { hr = desktop->ParseDisplayName(NULL, NULL, const_cast(dir.value().c_str()), NULL, &dir_item, NULL); - if (FAILED(hr)) { - ui::win::OpenFolderViaShell(dir); + if (FAILED(hr)) return; - } base::win::ScopedCoMem file_item; hr = desktop->ParseDisplayName( NULL, NULL, const_cast(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); } } }