Revision: 4743
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4743&view=rev
Author:   hofman
Date:     2008-10-06 11:25:00 +0000 (Mon, 06 Oct 2008)

Log Message:
-----------
Remove quotes from filenames also for synctex

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

Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m   2008-10-05 20:54:05 UTC (rev 4742)
+++ trunk/SKPDFSynchronizer.m   2008-10-06 11:25:00 UTC (rev 4743)
@@ -327,6 +327,8 @@
 #pragma mark | Server thread
 
 - (NSString *)sourceFileForFileName:(NSString *)file 
defaultExtension:(NSString *)extension {
+    if ([file length] > 2 && [file characterAtIndex:0] == '"' && [file 
characterAtIndex:[file length] - 1] == '"')
+        file = [file substringWithRange:NSMakeRange(1, [file length] - 2)];
     if (extension && [[file pathExtension] length] == 0)
         file = [file stringByAppendingPathExtension:extension];
     if ([file isAbsolutePath] == NO)
@@ -376,8 +378,6 @@
         if ([sc scanUpToCharactersFromSet:[NSCharacterSet newlineCharacterSet] 
intoString:&file] &&
             [sc scanCharactersFromSet:[NSCharacterSet newlineCharacterSet] 
intoString:NULL]) {
             
-            if ([file length] > 2 && [file characterAtIndex:0] == '"' && [file 
characterAtIndex:[file length] - 1] == '"')
-                file = [file substringWithRange:NSMakeRange(1, [file length] - 
2)];
             file = [self sourceFileForFileName:file 
defaultExtension:SKPDFSynchronizerTexExtension];
             [files addObject:file];
             
@@ -421,8 +421,6 @@
                     } else if (ch == '(') {
                         // start of a new source file
                         if ([sc scanUpToCharactersFromSet:[NSCharacterSet 
newlineCharacterSet] intoString:&file]) {
-                            if ([file length] > 2 && [file characterAtIndex:0] 
== '"' && [file characterAtIndex:[file length] - 1] == '"')
-                                file = [file substringWithRange:NSMakeRange(1, 
[file length] - 2)];
                             file = [self sourceFileForFileName:file 
defaultExtension:SKPDFSynchronizerTexExtension];
                             [files addObject:file];
                             if ([lines objectForKey:file] == nil) {


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to