Revision: 5876
http://skim-app.svn.sourceforge.net/skim-app/?rev=5876&view=rev
Author: hofman
Date: 2009-10-14 12:39:51 +0000 (Wed, 14 Oct 2009)
Log Message:
-----------
resolve symlinks in file path before getting UTI because NSWorkspace does not
do this
Modified Paths:
--------------
trunk/SKMainDocument.m
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2009-10-14 11:29:58 UTC (rev 5875)
+++ trunk/SKMainDocument.m 2009-10-14 12:39:51 UTC (rev 5876)
@@ -1357,7 +1357,7 @@
BOOL isDVI = NO;
if (extension) {
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
- NSString *theUTI = [ws typeOfFile:fileName error:NULL];
+ NSString *theUTI = [ws typeOfFile:[[fileName
stringByStandardizingPath] stringByResolvingSymlinksInPath] error:NULL];
if ([extension caseInsensitiveCompare:@"pdfd"] == NSOrderedSame || [ws
type:theUTI conformsToType:@"net.sourceforge.skim-app.pdfd"]) {
fileName = [[NSFileManager defaultManager]
bundledFileWithExtension:@"pdf" inPDFBundleAtPath:fileName error:NULL];
if (fileName == nil)
@@ -1597,7 +1597,7 @@
[cmdString insertString:@"\"" atIndex:0];
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
- NSString *theUTI = [ws typeOfFile:editorCmd error:NULL];
+ NSString *theUTI = [ws typeOfFile:[[editorCmd
stringByStandardizingPath] stringByResolvingSymlinksInPath] error:NULL];
if ([ws type:theUTI conformsToType:@"com.apple.applescript.script"] ||
[ws type:theUTI conformsToType:@"com.apple.applescript.text"])
[cmdString insertString:@"/usr/bin/osascript " atIndex:0];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit