Revision: 4236
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4236&view=rev
Author:   hofman
Date:     2008-07-17 13:25:00 +0000 (Thu, 17 Jul 2008)

Log Message:
-----------
more sensible check for appending pdf extension in tool

Modified Paths:
--------------
    trunk/SkimNotes/skimnotes.m

Modified: trunk/SkimNotes/skimnotes.m
===================================================================
--- trunk/SkimNotes/skimnotes.m 2008-07-17 11:36:11 UTC (rev 4235)
+++ trunk/SkimNotes/skimnotes.m 2008-07-17 13:25:00 UTC (rev 4236)
@@ -206,9 +206,8 @@
             notesPath = [[pdfPath stringByDeletingPathExtension] 
stringByAppendingPathExtension:format == SKNFormatText ? TXT_EXTENSION : format 
== SKNFormatRTF ? RTF_EXTENSION : SKIM_EXTENSION];
         }
         
-        if ([[pdfPath pathExtension] caseInsensitiveCompare:PDF_EXTENSION] == 
NSOrderedSame && 
-            ([fm fileExistsAtPath:pdfPath isDirectory:&isDir] == NO || isDir))
-            pdfPath = [pdfPath stringByAppendingPathExtension:PDF_EXTENSION];
+        if ([[pdfPath pathExtension] caseInsensitiveCompare:PDF_EXTENSION] != 
NSOrderedSame)
+            pdfPath = [[pdfPath stringByDeletingPathExtension] 
stringByAppendingPathExtension:PDF_EXTENSION];
         
         if ([fm fileExistsAtPath:pdfPath isDirectory:&isDir] == NO || isDir) {
             error = [NSError errorWithDomain:NSPOSIXErrorDomain code:ENOENT 
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"PDF file does not exist", 
NSLocalizedDescriptionKey, 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