Revision: 4056
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4056&view=rev
Author:   hofman
Date:     2008-06-23 01:56:56 -0700 (Mon, 23 Jun 2008)

Log Message:
-----------
Also return error when a fragment was not found

Modified Paths:
--------------
    trunk/SkimNotes/SKNExtendedAttributeManager.m

Modified: trunk/SkimNotes/SKNExtendedAttributeManager.m
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.m       2008-06-23 03:43:11 UTC 
(rev 4055)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.m       2008-06-23 08:56:56 UTC 
(rev 4056)
@@ -251,16 +251,18 @@
         BOOL success = (nil != uniqueValue && numberOfFragments > 0);
         
         // somewhat generic error message here; include failing key?
-        if (NO == success && NULL != error) *error = [NSError 
errorWithDomain:SKNErrorDomain code:0 userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:path, NSFilePathErrorKey, 
SKNLocalizedString(@"failed to read key from property list", @""), 
NSLocalizedDescriptionKey, nil]];
+        if (NO == success && NULL != error) *error = [NSError 
errorWithDomain:SKNErrorDomain code:0 userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:path, NSFilePathErrorKey, 
SKNLocalizedString(@"Failed to read key from property list.", @"Error 
description"), NSLocalizedDescriptionKey, nil]];
         
         // reassemble the original data object
         for (i = 0; success && i < numberOfFragments; i++) {
             name = [NSString stringWithFormat:@"[EMAIL PROTECTED]", 
uniqueValue, i];
             subdata = [self extendedAttributeNamed:name atPath:path 
traverseLink:follow error:error];
-            if (nil == subdata)
+            if (nil == subdata) {
+                if (NULL != error) *error = [NSError 
errorWithDomain:SKNErrorDomain code:0 userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:path, NSFilePathErrorKey, 
SKNLocalizedString(@"Failed to reassemble attribute value.", @"Error 
description"), NSLocalizedDescriptionKey, nil]];
                 success = NO;
-            else
+            } else {
                 [buffer appendData:subdata];
+            }
         }
         
         [attribute release];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to