Skip to content

Commit 9cf3210

Browse files
committed
Hash the image name instead of the full path. See #58
1 parent aa1d74e commit 9cf3210

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

FastImageCacheDemo/Classes/FICDPhoto.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ - (void)deleteThumbnail {
170170
- (NSString *)UUID {
171171
if (_UUID == nil) {
172172
// MD5 hashing is expensive enough that we only want to do it once
173-
CFUUIDBytes UUIDBytes = FICUUIDBytesFromMD5HashOfString([_sourceImageURL absoluteString]);
173+
NSString *imageName = [_sourceImageURL lastPathComponent];
174+
CFUUIDBytes UUIDBytes = FICUUIDBytesFromMD5HashOfString(imageName);
174175
_UUID = FICStringWithUUIDBytes(UUIDBytes);
175176
}
176177

0 commit comments

Comments
 (0)