From 175f39717334dbd461e8c3229f7b350843a9113e Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 8 Apr 2015 19:31:46 +0530 Subject: [PATCH] shell: fix regression for moveItemToTrash on mac --- atom/common/platform_util_mac.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/common/platform_util_mac.mm b/atom/common/platform_util_mac.mm index d9fd23c70d94..41f3c59916aa 100644 --- a/atom/common/platform_util_mac.mm +++ b/atom/common/platform_util_mac.mm @@ -131,7 +131,7 @@ bool MoveItemToTrash(const base::FilePath& full_path) { NSString* path_string = base::SysUTF8ToNSString(full_path.value()); NSArray* file_array = [NSArray arrayWithObject:[path_string lastPathComponent]]; - int status = [[NSWorkspace sharedWorkspace] + BOOL status = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[path_string stringByDeletingLastPathComponent] destination:@"" @@ -140,7 +140,7 @@ bool MoveItemToTrash(const base::FilePath& full_path) { if (!path_string || !file_array || !status) LOG(WARNING) << "NSWorkspace failed to move file " << full_path.value() << " to trash"; - return (status == 0); + return status; } void Beep() {