Revision: 4055
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4055&view=rev
Author:   amaxwell
Date:     2008-06-22 20:43:11 -0700 (Sun, 22 Jun 2008)

Log Message:
-----------
- Use the correct unique key value, which fixes the crash James reported
- Ensure the error is properly initialized in case of an incorrect key.
  This code path was never hit previously since the key was always correct.

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

Modified: trunk/SkimNotes/SKNExtendedAttributeManager.m
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.m       2008-06-22 20:34:00 UTC 
(rev 4054)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.m       2008-06-23 03:43:11 UTC 
(rev 4055)
@@ -87,7 +87,7 @@
     if (self = [super init]) {
         if (prefix) {
             namePrefix = [[prefix stringByAppendingString:@"_"] retain];
-            uniqueKey = [[prefix stringByAppendingString:@"_key"] retain];
+            uniqueKey = [[prefix stringByAppendingString:@"_unique_key"] 
retain];
             wrapperKey = [[prefix stringByAppendingString:@"_has_wrapper"] 
retain];
             fragmentsKey = [[prefix 
stringByAppendingString:@"_number_of_fragments"] retain];
         } else if (sharedNoSplitManager) {
@@ -250,6 +250,9 @@
         NSData *subdata;
         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]];
+        
         // reassemble the original data object
         for (i = 0; success && i < numberOfFragments; i++) {
             name = [NSString stringWithFormat:@"[EMAIL PROTECTED]", 
uniqueValue, i];


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