Revision: 5619
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5619&view=rev
Author:   hofman
Date:     2009-09-02 10:26:34 +0000 (Wed, 02 Sep 2009)

Log Message:
-----------
don't raise a script error when reverting during an update

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

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2009-09-02 09:21:22 UTC (rev 5618)
+++ trunk/SKPDFDocument.m       2009-09-02 10:26:34 UTC (rev 5619)
@@ -2102,11 +2102,8 @@
 
 - (void)handleRevertScriptCommand:(NSScriptCommand *)command {
     if ([self fileURL] && [[NSFileManager defaultManager] 
fileExistsAtPath:[self fileName]]) {
-        if (docFlags.isUpdatingFile) {
+        if (docFlags.isUpdatingFile == NO && [self revertToContentsOfURL:[self 
fileURL] ofType:[self fileType] error:NULL] == NO) {
             [command setScriptErrorNumber:NSInternalScriptError];
-            [command setScriptErrorString:@"Cannot revert."];
-        } else if ([self revertToContentsOfURL:[self fileURL] ofType:[self 
fileType] error:NULL] == NO) {
-            [command setScriptErrorNumber:NSInternalScriptError];
             [command setScriptErrorString:@"Revert failed."];
         }
     } else {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to