Revision: 7666
http://skim-app.svn.sourceforge.net/skim-app/?rev=7666&view=rev
Author: hofman
Date: 2012-02-23 10:49:33 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Make sure documents are opened with a file path URL, as file reference URLs can
become invalid on saving because the old file will be deleted.
Modified Paths:
--------------
trunk/SKDocumentController.m
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2012-02-22 12:57:54 UTC (rev 7665)
+++ trunk/SKDocumentController.m 2012-02-23 10:49:33 UTC (rev 7666)
@@ -328,6 +328,9 @@
NSString *fragment = [absoluteURL fragment];
if ([fragment length] > 0)
absoluteURL = [NSURL fileURLWithPath:[absoluteURL path]];
+ // don't open a file with a file reference URL, because the system messes
those up, they become invalid when you save
+ if ([absoluteURL respondsToSelector:@selector(filePathURL)] &&
[absoluteURL isFileURL])
+ absoluteURL = [absoluteURL filePathURL];
NSString *type = [self typeForContentsOfURL:absoluteURL error:NULL];
if ([type isEqualToString:SKNotesDocumentType]) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit