Revision: 11379
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11379&view=rev
Author: amaxwell
Date: 2007-10-24 21:13:41 -0700 (Wed, 24 Oct 2007)
Log Message:
-----------
Guard against inserting nil into an array, and initialize with absolute URLs.
This doesn't seem quite right.
Modified Paths:
--------------
branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m
Modified: branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m
===================================================================
--- branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m 2007-10-25 03:12:54 UTC
(rev 11378)
+++ branches/TRY_ARM_FILE_INTERFACE/bibdesk/BibItem.m 2007-10-25 04:13:41 UTC
(rev 11379)
@@ -1613,7 +1613,7 @@
string = [NSMutableString string];
for (i = 0; i < iMax; i++) {
NSString *key = [NSString stringWithFormat:@"Bdsk-File-%d", i];
- NSString *value = [[files objectAtIndex:i]
base64StringRelativeToPath:basePath];
+ NSString *value = [[files objectAtIndex:i]
base64StringRelativeToPath:basePath convertedRelativeToPath:nil];
OBPRECONDITION([value rangeOfCharacterFromSet:[NSCharacterSet
curlyBraceCharacterSet]].length == 0);
[string appendFormat:@",\n\t%@ = [EMAIL PROTECTED]", key, value];
}
@@ -2451,9 +2451,13 @@
BibItem *self = (BibItem *)context;
NSURL *value = [self localFileURLForField:(id)key];
if (value) {
- BDSKAliasFile *aFile = [[BDSKAliasFile alloc] initWithURL:value
relativeToURL:[self baseURL]];
- [self->files addObject:aFile];
- [aFile release];
+ // !!! file URLs are always absolute but the init method here always
returns nil, which probably means that we should do the first initialization
with relative paths instead of expending them first
+ BDSKAliasFile *aFile = [[BDSKAliasFile alloc] initWithURL:value
relativeToURL:nil];
+ if (aFile) {
+ [self->files addObject:aFile];
+ [aFile release];
+ }
+ else NSLog(@"*** Unable to create alias to %@", value);
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit