mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
add a log message if setting the quarantine attribute fails
This commit is contained in:
parent
8057b31936
commit
fc5b820182
1 changed files with 3 additions and 2 deletions
|
@ -1824,10 +1824,11 @@ int trashDataFile(const char * filename)
|
|||
if (FSPathMakeRef((const UInt8 *)[dataLocation UTF8String], &ref, NULL) == noErr)
|
||||
{
|
||||
NSDictionary * quarantineProperties = [NSDictionary dictionaryWithObject: (NSString *)kLSQuarantineTypeOtherDownload forKey: (NSString *)kLSQuarantineTypeKey];
|
||||
LSSetItemAttribute(&ref, kLSRolesAll, kLSItemQuarantineProperties, quarantineProperties);
|
||||
if (LSSetItemAttribute(&ref, kLSRolesAll, kLSItemQuarantineProperties, quarantineProperties) != noErr)
|
||||
NSLog(@"Failed to quarantine: %@", dataLocation);
|
||||
}
|
||||
else
|
||||
NSLog(@"Could not find file to quarantine: %@!", dataLocation);
|
||||
NSLog(@"Could not find file to quarantine: %@", dataLocation);
|
||||
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue