Merge pull request #1387 from deepak1556/shell_patch
shell: fix regression for moveItemToTrash on mac
This commit is contained in:
commit
eddb23d56b
1 changed files with 2 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue