From: Cheng Zhao Date: Wed, 22 Apr 2015 02:04:30 +0000 (+0800) Subject: win: OpenItemViaShell is removed X-Git-Tag: v0.25.0~1^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a213a8639f6466e9c4f510ca910c5e90d2f7ed62;p=electron.git win: OpenItemViaShell is removed --- diff --git a/atom/common/platform_util_win.cc b/atom/common/platform_util_win.cc index 78fb0ca0..1998b887 100644 --- a/atom/common/platform_util_win.cc +++ b/atom/common/platform_util_win.cc @@ -13,6 +13,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -128,7 +129,10 @@ void ShowItemInFolder(const base::FilePath& full_path) { } void OpenItem(const base::FilePath& full_path) { - ui::win::OpenItemViaShell(full_path); + if (base::DirectoryExists(full_path)) + ui::win::OpenFolderViaShell(full_path); + else + ui::win::OpenFileViaShell(full_path); } void OpenExternal(const GURL& url) {