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.
This commit is contained in:
parent
72d6778894
commit
2ed46e6f7f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue