Revision: 4548
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4548&view=rev
Author:   hofman
Date:     2008-09-04 15:57:55 +0000 (Thu, 04 Sep 2008)

Log Message:
-----------
small changes to file auto update

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

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2008-09-04 13:49:06 UTC (rev 4547)
+++ trunk/SKPDFDocument.m       2008-09-04 15:57:55 UTC (rev 4548)
@@ -1266,12 +1266,10 @@
     NSData *trailerData = [fh readDataToEndOfFile];
     NSRange range = NSMakeRange(0, [trailerData length]);
     const char *pattern = "%%EOF";
-    unsigned patternLength = strlen(pattern);
     
     if (isDVI) {
         pattern = [[NSString stringWithFormat:@"%C%C%C%C", 0xFB02, 0xFB02, 
0xFB02, 0xFB02] cStringUsingEncoding:NSMacOSRomanStringEncoding];
-        patternLength = strlen(pattern);
-        range = NSMakeRange(patternLength, [trailerData length] - 
patternLength);
+        range = NSMakeRange(strlen(pattern), [trailerData length] - 
strlen(pattern));
     }
     return NSNotFound != [trailerData indexOfBytes:pattern 
length:strlen(pattern) options:NSBackwardsSearch range:range];
 }
@@ -1326,7 +1324,7 @@
 - (void)handleFileUpdateNotification:(NSNotification *)notification {
     NSString *path = [[notification userInfo] objectForKey:@"path"];
     
-    if ([watchedFile isEqualToString:path]) {
+    if ([watchedFile isEqualToString:path] || notification == nil) {
         // should never happen
         if (notification && [path isEqualToString:[self fileName]] == NO)
             NSLog(@"*** received change notice for %@", path);


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