Revision: 7656
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7656&view=rev
Author:   hofman
Date:     2012-02-20 12:35:28 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
Make sure we pass a file path URL to note saving mechanism, because a file 
reference URL may become invalid after saving as the original file may be 
removed

Modified Paths:
--------------
    trunk/SKMainDocument.m

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2012-02-20 12:19:24 UTC (rev 7655)
+++ trunk/SKMainDocument.m      2012-02-20 12:35:28 UTC (rev 7656)
@@ -483,7 +483,8 @@
         [[NSUserDefaults standardUserDefaults] setObject:typeName 
forKey:SKLastExportedTypeKey];
     }
     
-    NSMutableDictionary *info = [[NSMutableDictionary alloc] 
initWithObjectsAndKeys:absoluteURL, URL_KEY, typeName, TYPE_KEY, [NSNumber 
numberWithUnsignedInteger:saveOperation], SAVEOPERATION_KEY, nil];
+    NSURL *destURL = [absoluteURL 
respondsToSelector:@selector(isFileReferenceURL)] && [absoluteURL 
isFileReferenceURL] ? [absoluteURL filePathURL] : absoluteURL;
+    NSMutableDictionary *info = [[NSMutableDictionary alloc] 
initWithObjectsAndKeys:destURL, URL_KEY, typeName, TYPE_KEY, [NSNumber 
numberWithUnsignedInteger:saveOperation], SAVEOPERATION_KEY, nil];
     if (delegate && didSaveSelector) {
         NSInvocation *invocation = [NSInvocation invocationWithTarget:delegate 
selector:didSaveSelector];
         [invocation setArgument:&contextInfo atIndex:4];

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
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to