1
0
Fork 0
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:
Mitchell Livingston 2011-11-02 03:19:44 +00:00
parent 8057b31936
commit fc5b820182

View file

@ -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;