Revision: 4342
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4342&view=rev
Author:   hofman
Date:     2008-08-03 11:07:51 +0000 (Sun, 03 Aug 2008)

Log Message:
-----------
Standardize tex file names.

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

Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m   2008-08-03 10:24:56 UTC (rev 4341)
+++ trunk/SKPDFSynchronizer.m   2008-08-03 11:07:51 UTC (rev 4342)
@@ -57,7 +57,7 @@
         file = [file 
stringByAppendingPathExtension:SKPDFSynchronizerTexExtension];
     if ([file isAbsolutePath] == NO)
         file = [base stringByAppendingPathComponent:file];
-    return file;
+    return [file stringByStandardizingPath];
 }
 
 #pragma mark -
@@ -567,12 +567,12 @@
     if (scanner = synctex_scanner_new_with_output_file([theFileName 
fileSystemRepresentation])) {
         [self 
setSyncFileName:SKPathFromFileSystemRepresentation(synctex_scanner_get_synctex(scanner))];
         [filenames removeAllObjects];
-        NSString *theFileName = [self fileName];
+        NSString *basePath = [[self fileName] 
stringByDeletingLastPathComponent];
         NSString *file, *filename;
         synctex_node_t node = synctex_scanner_input(scanner);
         do {
             filename = 
SKPathFromFileSystemRepresentation(synctex_scanner_get_name(scanner, 
synctex_node_tag(node)));
-            file = SKTeXSourceFile(filename, [theFileName 
stringByDeletingLastPathComponent]);
+            file = SKTeXSourceFile(filename, basePath);
             [filenames setObject:filename forKey:file];
         } while (node = synctex_node_next(node));
         isPdfsync = NO;
@@ -664,6 +664,8 @@
         NSPoint foundPoint = NSZeroPoint;
         BOOL success = NO;
         
+        file = SKTeXSourceFile(file, [[self fileName] 
stringByDeletingLastPathComponent]);
+        
         if (isPdfsync)
             success = [self pdfsyncFindPage:&foundPageIndex 
location:&foundPoint forLine:line inFile:file];
         else


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