Skip to content

Commit

Permalink
Fixed a stupid bug that would cause file hash sums to be recalculated…
Browse files Browse the repository at this point in the history
… every time they were accessed. Archive sync should be a lot faster now.
  • Loading branch information
cyco committed Mar 8, 2013
1 parent e8d7788 commit b22874f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions OpenEmu/OEDBRom.m
Expand Up @@ -215,12 +215,11 @@ - (void)setURL:(NSURL *)url
- (NSString *)md5Hash
{
NSString *hash = [self md5];
if(hash != nil)
if(hash == nil)
{
[self OE_calculateHashes];
return [self md5HashIfAvailable];
hash = [self md5HashIfAvailable];
}

return hash;
}

Expand All @@ -232,13 +231,11 @@ - (NSString *)md5HashIfAvailable
- (NSString *)crcHash
{
NSString *hash = [self crc32];

if(hash != nil)
if(hash == nil)
{
[self OE_calculateHashes];
return [self crcHashIfAvailable];
hash = [self crcHashIfAvailable];
}

return hash;
}

Expand Down

0 comments on commit b22874f

Please sign in to comment.