]> granicus.if.org Git - transmission/commitdiff
add a log message if setting the quarantine attribute fails
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 2 Nov 2011 03:19:44 +0000 (03:19 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 2 Nov 2011 03:19:44 +0000 (03:19 +0000)
macosx/Torrent.m

index b2adfcf5da262249d98e01ab3b188b5bc5d3ee13..d7b1d8b6bf7ddddddbc4774e82a935249f631925 100644 (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;