Revision: 18512
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18512&view=rev
Author: hofman
Date: 2012-02-20 21:27:28 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
Make sure the save target URL we remember is a file path URL rather than a file
reference URL, because the latter can become invalid when the file is deleted
Modified Paths:
--------------
trunk/bibdesk/BibDocument.m
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2012-02-20 13:45:19 UTC (rev 18511)
+++ trunk/bibdesk/BibDocument.m 2012-02-20 21:27:28 UTC (rev 18512)
@@ -166,6 +166,10 @@
- (void)changeSaveType:(id)sender;
@end
+@interface NSURL (BDSKSnowLeopardDeclarations)
+- (NSURL *)filePathURL;
+@end
+
@implementation BibDocument
static NSOperationQueue *metadataCacheQueue = nil;
@@ -1121,7 +1125,7 @@
- (void)saveToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName
forSaveOperation:(NSSaveOperationType)saveOperation delegate:(id)delegate
didSaveSelector:(SEL)didSaveSelector contextInfo:(void *)contextInfo {
// Override so we can determine if this is an autosave in
writeToURL:ofType:error:.
docState.currentSaveOperationType = saveOperation;
- saveTargetURL = [absoluteURL copy];
+ saveTargetURL = [([absoluteURL respondsToSelector:@selector(filePathURL)]
? [absoluteURL filePathURL] : absoluteURL) copy];
NSInvocation *invocation = nil;
if (delegate && didSaveSelector) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit