Merge pull request #976 from ghazel/file-extension
append the original path extension to the hash filename. closes #967
This commit is contained in:
commit
577fefa26e
|
@ -181,8 +181,9 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
}
|
}
|
||||||
unsigned char r[CC_MD5_DIGEST_LENGTH];
|
unsigned char r[CC_MD5_DIGEST_LENGTH];
|
||||||
CC_MD5(str, (CC_LONG)strlen(str), r);
|
CC_MD5(str, (CC_LONG)strlen(str), r);
|
||||||
NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x.%@",
|
||||||
r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]];
|
r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15],
|
||||||
|
[key pathExtension]];
|
||||||
|
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue