mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Fix couple of nullability warnings
This commit is contained in:
1 parent
1438dd6140
commit
bcb3f669ba
1 file changed
+5
-2
Vendored
+5
-2
@@ -96,7 +96,9 @@
|
||||
}
|
||||
|
||||
// Create a temporary directory for our new app that resides on our destination's volume
|
||||
NSURL *tempNewDirectoryURL = [fileManager makeTemporaryDirectoryWithPreferredName:[installationURL.lastPathComponent.stringByDeletingPathExtension stringByAppendingString:@" (Incomplete Update)"] appropriateForDirectoryURL:installationURL.URLByDeletingLastPathComponent error:error];
|
||||
NSString *installationDirectoryName = installationURL.lastPathComponent;
|
||||
NSURL *installationDirectoryURL = installationURL.URLByDeletingLastPathComponent;
|
||||
NSURL *tempNewDirectoryURL = (installationDirectoryName != nil && installationDirectoryURL != nil) ? [fileManager makeTemporaryDirectoryWithPreferredName:[installationDirectoryName.stringByDeletingPathExtension stringByAppendingString:@" (Incomplete Update)"] appropriateForDirectoryURL:installationDirectoryURL error:error] : nil;
|
||||
if (tempNewDirectoryURL == nil) {
|
||||
SULog(@"Failed to make new temp directory");
|
||||
return NO;
|
||||
@@ -159,7 +161,8 @@
|
||||
NSString *oldDestinationNameWithPathExtension = [oldDestinationName stringByAppendingPathExtension:oldURLExtension];
|
||||
|
||||
// Create a temporary directory for our old app that resides on its volume
|
||||
NSURL *tempOldDirectoryURL = [fileManager makeTemporaryDirectoryWithPreferredName:oldDestinationName appropriateForDirectoryURL:oldURL.URLByDeletingLastPathComponent error:error];
|
||||
NSURL *oldDirectoryURL = oldURL.URLByDeletingLastPathComponent;
|
||||
NSURL *tempOldDirectoryURL = (oldDirectoryURL != nil) ? [fileManager makeTemporaryDirectoryWithPreferredName:oldDestinationName appropriateForDirectoryURL:oldDirectoryURL error:error] : nil;
|
||||
if (tempOldDirectoryURL == nil) {
|
||||
SULog(@"Failed to create temporary directory for old app at %@", oldURL.path);
|
||||
[fileManager removeItemAtURL:tempNewDirectoryURL error:NULL];
|
||||
|
||||
Reference in new issue
Block a user