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());
|
NSString* path_string = base::SysUTF8ToNSString(full_path.value());
|
||||||
NSArray* file_array =
|
NSArray* file_array =
|
||||||
[NSArray arrayWithObject:[path_string lastPathComponent]];
|
[NSArray arrayWithObject:[path_string lastPathComponent]];
|
||||||
int status = [[NSWorkspace sharedWorkspace]
|
BOOL status = [[NSWorkspace sharedWorkspace]
|
||||||
performFileOperation:NSWorkspaceRecycleOperation
|
performFileOperation:NSWorkspaceRecycleOperation
|
||||||
source:[path_string stringByDeletingLastPathComponent]
|
source:[path_string stringByDeletingLastPathComponent]
|
||||||
destination:@""
|
destination:@""
|
||||||
|
@ -140,7 +140,7 @@ bool MoveItemToTrash(const base::FilePath& full_path) {
|
||||||
if (!path_string || !file_array || !status)
|
if (!path_string || !file_array || !status)
|
||||||
LOG(WARNING) << "NSWorkspace failed to move file " << full_path.value()
|
LOG(WARNING) << "NSWorkspace failed to move file " << full_path.value()
|
||||||
<< " to trash";
|
<< " to trash";
|
||||||
return (status == 0);
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Beep() {
|
void Beep() {
|
||||||
|
|
Loading…
Reference in a new issue