From: Mark Samman Date: Wed, 2 Jul 2014 01:55:29 +0000 (+0200) Subject: Move item to trash without confirming on Windows X-Git-Tag: v0.14.0~6^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2ed46e6f7f3f204a1d097afdece901329dc1822b;p=electron.git Move item to trash without confirming on Windows This will skip the "Are you sure you want to move this file to the Recycle Bin?" dialog on Windows. --- diff --git a/atom/common/platform_util_win.cc b/atom/common/platform_util_win.cc index 6c3ea982..52e87acc 100644 --- a/atom/common/platform_util_win.cc +++ b/atom/common/platform_util_win.cc @@ -175,7 +175,7 @@ void MoveItemToTrash(const base::FilePath& path) { SHFILEOPSTRUCT file_operation = {0}; file_operation.wFunc = FO_DELETE; file_operation.pFrom = double_terminated_path; - file_operation.fFlags = FOF_ALLOWUNDO; + file_operation.fFlags = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOCONFIRMATION; SHFileOperation(&file_operation); }