Revision: 4381
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4381&view=rev
Author:   hofman
Date:     2008-08-11 21:59:31 +0000 (Mon, 11 Aug 2008)

Log Message:
-----------
Set full synctex file path

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

Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m   2008-08-11 21:30:01 UTC (rev 4380)
+++ trunk/SKPDFSynchronizer.m   2008-08-11 21:59:31 UTC (rev 4381)
@@ -570,12 +570,15 @@
     if (scanner)
         synctex_scanner_free(scanner);
     if (scanner = synctex_scanner_new_with_output_file([theFileName 
fileSystemRepresentation])) {
-        [self 
setSyncFileName:SKPathFromFileSystemRepresentation(synctex_scanner_get_synctex(scanner))];
+        NSString *theSyncFilename = 
SKPathFromFileSystemRepresentation(synctex_scanner_get_synctex(scanner));
+        if ([theSyncFilename isAbsolutePath] == NO)
+            theSyncFilename = [[theFileName stringByDeletingLastPathComponent] 
stringByAppendingPathComponent:theSyncFilename];
+        [self setSyncFileName:theSyncFilename];
         if (filenames)
             [filenames removeAllObjects];
         else
             filenames = (NSMutableDictionary 
*)CFDictionaryCreateMutable(kCFAllocatorDefault, 0, 
&kSKCaseInsensitiveStringDictionaryKeyCallBacks, 
&kCFTypeDictionaryValueCallBacks);
-        NSString *basePath = [[self fileName] 
stringByDeletingLastPathComponent];
+        NSString *basePath = [theSyncFilename 
stringByDeletingLastPathComponent];
         NSString *file, *filename;
         synctex_node_t node = synctex_scanner_input(scanner);
         do {
@@ -595,7 +598,7 @@
         synctex_node_t node = synctex_next_result(scanner);
         if (node) {
             *line = synctex_node_line(node) - 1;
-            *file = 
SKTeXSourceFile(SKPathFromFileSystemRepresentation(synctex_scanner_get_name(scanner,
 synctex_node_tag(node))), [[self fileName] stringByDeletingLastPathComponent]);
+            *file = 
SKTeXSourceFile(SKPathFromFileSystemRepresentation(synctex_scanner_get_name(scanner,
 synctex_node_tag(node))), [[self syncFileName] 
stringByDeletingLastPathComponent]);
             rv = YES;
         }
     }


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