From 2ed46e6f7f3f204a1d097afdece901329dc1822b Mon Sep 17 00:00:00 2001 From: Mark Samman Date: Wed, 2 Jul 2014 03:55:29 +0200 Subject: [PATCH] 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. --- atom/common/platform_util_win.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.43.0