adium 5054:55e780feaac8: Improve the error message when failing ...
commits at adium.im
commits at adium.im
Wed Sep 12 10:57:41 UTC 2012
details: http://hg.adium.im/adium/rev/55e780feaac8
revision: 5054:55e780feaac8
branch: (none)
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Wed Sep 12 12:56:59 2012 +0200
Improve the error message when failing to unquarantine.
diffs (19 lines):
diff -r 2daa5af4cb55 -r 55e780feaac8 Source/AIXMLAppender.m
--- a/Source/AIXMLAppender.m Wed Sep 12 12:54:47 2012 +0200
+++ b/Source/AIXMLAppender.m Wed Sep 12 12:56:59 2012 +0200
@@ -238,10 +238,12 @@
// The properties have to be unset on the .chatlog itself, not the .xml in it
if (FSPathMakeRef((UInt8 const *)[[self.path stringByDeletingLastPathComponent] fileSystemRepresentation], &fsRef, NULL) == noErr) {
- if (LSSetItemAttribute(&fsRef, kLSRolesAll, kLSItemQuarantineProperties, NULL) != noErr) {
- AILogWithSignature(@"Un-quarantining file %@ failed!", [self.path stringByDeletingLastPathComponent]);
+ OSStatus err = LSSetItemAttribute(&fsRef, kLSRolesAll, kLSItemQuarantineProperties, NULL);
+ if (err != noErr) {
+ AILogWithSignature(@"Un-quarantining file %@ failed: %d!", [self.path stringByDeletingLastPathComponent], err);
+ } else {
+ AILogWithSignature(@"Un-quarantining file %@ succeeded!", [self.path stringByDeletingLastPathComponent]);
}
- AILogWithSignature(@"Un-quarantining file %@ succeeded!", [self.path stringByDeletingLastPathComponent]);
} else {
AILogWithSignature(@"Could not find file to quarantine: %@!", [self.path stringByDeletingLastPathComponent]);
}
More information about the commits
mailing list