Null warning

This commit is contained in:
Kornel Lesiński committed 2017-01-03 16:13:15 +00:00
1 parent 271d504f6d
commit dc1151a5ff
1 file changed
+3 -1
+3 -1
View File
@@ -155,8 +155,10 @@ static NSString * const UPDATED_VERSION = @"2.0";
// Copy our appcast over to the server directory
NSURL *appcastDestinationURL = [[serverDirectoryURL URLByAppendingPathComponent:appcastName] URLByAppendingPathExtension:appcastExtension];
NSURL *appcastPath = [mainBundle URLForResource:appcastName withExtension:appcastExtension];
assert(appcastPath);
NSError *copyAppcastError = nil;
if (![fileManager copyItemAtURL:[mainBundle URLForResource:appcastName withExtension:appcastExtension] toURL:appcastDestinationURL error:&copyAppcastError]) {
if (![fileManager copyItemAtURL:appcastPath toURL:appcastDestinationURL error:&copyAppcastError]) {
NSLog(@"Failed to copy appcast into cache directory with error %@", copyAppcastError);
assert(NO);
}