Skip to content

Commit 19ef7a0

Browse files
codebyterezcbenz
authored andcommitted
fix: don't fallback to OpenFolderViaShell (electron#21668)
1 parent c0bde4b commit 19ef7a0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

shell/common/platform_util_win.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,19 +272,15 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) {
272272
hr = desktop->ParseDisplayName(NULL, NULL,
273273
const_cast<wchar_t*>(dir.value().c_str()),
274274
NULL, &dir_item, NULL);
275-
if (FAILED(hr)) {
276-
ui::win::OpenFolderViaShell(dir);
275+
if (FAILED(hr))
277276
return;
278-
}
279277

280278
base::win::ScopedCoMem<ITEMIDLIST> file_item;
281279
hr = desktop->ParseDisplayName(
282280
NULL, NULL, const_cast<wchar_t*>(full_path.value().c_str()), NULL,
283281
&file_item, NULL);
284-
if (FAILED(hr)) {
285-
ui::win::OpenFolderViaShell(dir);
282+
if (FAILED(hr))
286283
return;
287-
}
288284

289285
const ITEMIDLIST* highlight[] = {file_item};
290286
hr = SHOpenFolderAndSelectItems(dir_item, base::size(highlight), highlight,
@@ -299,7 +295,6 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) {
299295
LOG(WARNING) << " " << __func__ << "(): Can't open full_path = \""
300296
<< full_path.value() << "\""
301297
<< " hr = " << logging::SystemErrorCodeToString(hr);
302-
ui::win::OpenFolderViaShell(dir);
303298
}
304299
}
305300
}

0 commit comments

Comments
 (0)