Merge pull request #368 from RobertCain/analyze-success

Fixes Analyze issue for success variable
This commit is contained in:
Antoine Cœur
2017-08-25 13:57:53 +08:00
committed by GitHub
+2 -2
View File
@@ -491,8 +491,8 @@ NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain";
if ([fileManager fileExistsAtPath:fullPath])
{
NSError *error = nil;
BOOL success = [fileManager removeItemAtPath:fullPath error:&error];
if (!success)
BOOL removeSuccess = [fileManager removeItemAtPath:fullPath error:&error];
if (!removeSuccess)
{
NSString *message = [NSString stringWithFormat:@"Failed to delete existing symbolic link at \"%@\"", error.localizedDescription];
NSLog(@"[SSZipArchive] %@", message);