Skip to content

Commit

Permalink
Fix logic error in checking for failedToRemoveNonExistentFile error
Browse files Browse the repository at this point in the history
  • Loading branch information
erichoracek committed Oct 9, 2015
1 parent f8a09b6 commit 4469b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MotifCLI/MotifCLI/NSOutputStream+TemporaryOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ - (BOOL)copyToDestinationIfNecessaryWithError:(NSError **)error {
NSError *removeError;
BOOL removeSuccess = [NSFileManager.defaultManager removeItemAtURL:self.destinationURL error:&removeError];

BOOL failedToRemoveNonExistentFile = !removeSuccess && ([removeError.domain isEqual:NSCocoaErrorDomain] && removeError.code != NSFileNoSuchFileError);
BOOL failedToRemoveNonExistentFile = !removeSuccess && ([removeError.domain isEqual:NSCocoaErrorDomain] && removeError.code == NSFileNoSuchFileError);

// If failed in any way other than failure to delete a file that doesn't
// exist, consider this a failure.
Expand Down

0 comments on commit 4469b18

Please sign in to comment.