From 1c0bf624822e31f704bbe2d4cdf0643fe7bb6131 Mon Sep 17 00:00:00 2001 From: Evgeny Kuklin Date: Wed, 19 Mar 2014 11:23:50 +0300 Subject: [PATCH] Update TKImageCache.m --- src/TapkuLibrary/TKImageCache.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TapkuLibrary/TKImageCache.m b/src/TapkuLibrary/TKImageCache.m index ffb5e649..7ab2bbee 100644 --- a/src/TapkuLibrary/TKImageCache.m +++ b/src/TapkuLibrary/TKImageCache.m @@ -256,8 +256,8 @@ - (void) removeCachedImagesFromDiskOlderThanTime:(NSTimeInterval)time{ for( NSString *file in files ) { if( ![file isEqual:@"."] && ![file isEqual:@".."] ) { - NSString *path = [path stringByAppendingPathComponent:file]; - NSDate *created = [[[NSFileManager defaultManager] attributesOfItemAtPath:path error:NULL] fileCreationDate]; + NSString *filePath = [path stringByAppendingPathComponent:file]; + NSDate *created = [[[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:NULL] fileCreationDate]; NSTimeInterval timeSince = fabs([created timeIntervalSinceNow]); if(timeSince > time){ @@ -265,7 +265,7 @@ - (void) removeCachedImagesFromDiskOlderThanTime:(NSTimeInterval)time{ dispatch_async(dispatch_get_main_queue(), ^{ if(_diskKeys) [_diskKeys removeObjectForKey:file]; }); - [[NSFileManager defaultManager] removeItemAtPath:[path stringByAppendingPathComponent:file] error:&error]; + [[NSFileManager defaultManager] removeItemAtPath:filePath error:&error]; } } }