shell: fix regression for moveItemToTrash on mac
authordeepak1556 <hop2deep@gmail.com>
Wed, 8 Apr 2015 14:01:46 +0000 (19:31 +0530)
committerdeepak1556 <hop2deep@gmail.com>
Mon, 13 Apr 2015 05:27:58 +0000 (10:57 +0530)
atom/common/platform_util_mac.mm

index d9fd23c..41f3c59 100644 (file)
@@ -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() {