Revision: 6501
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6501&view=rev
Author:   hofman
Date:     2010-04-29 17:24:37 +0000 (Thu, 29 Apr 2010)

Log Message:
-----------
add extra condition for failure of appcast loading

Modified Paths:
--------------
    trunk/vendorsrc/andymatuschak/Sparkle/SUAppcast.m

Modified: trunk/vendorsrc/andymatuschak/Sparkle/SUAppcast.m
===================================================================
--- trunk/vendorsrc/andymatuschak/Sparkle/SUAppcast.m   2010-04-29 15:08:40 UTC 
(rev 6500)
+++ trunk/vendorsrc/andymatuschak/Sparkle/SUAppcast.m   2010-04-29 17:24:37 UTC 
(rev 6501)
@@ -55,18 +55,27 @@
        download = nil;
     
        NSError *error = nil;
-    NSXMLDocument *document = [[NSXMLDocument alloc] 
initWithContentsOfURL:[NSURL fileURLWithPath:downloadFilename] options:0 
error:&error];
+    NSXMLDocument *document = nil;
        BOOL failed = NO;
        NSArray *xmlItems = nil;
        NSMutableArray *appcastItems = [NSMutableArray array];
        
+       if (downloadFilename)
+       {
+               document = [[[NSXMLDocument alloc] initWithContentsOfURL:[NSURL 
fileURLWithPath:downloadFilename] options:0 error:&error] autorelease];
+       
 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
-    [[NSFileManager defaultManager] removeFileAtPath:downloadFilename 
handler:nil];
+               [[NSFileManager defaultManager] 
removeFileAtPath:downloadFilename handler:nil];
 #else
-    [[NSFileManager defaultManager] removeItemAtPath:downloadFilename 
error:NULL];
+               [[NSFileManager defaultManager] 
removeItemAtPath:downloadFilename error:nil];
 #endif
-    [downloadFilename release];
-    downloadFilename = nil;
+               [downloadFilename release];
+               downloadFilename = nil;
+       }
+       else
+       {
+               failed = YES;
+       }
     
     if (nil == document)
     {


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

------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to