From 1e37b716c7676f0e2180a0d28055d0afaec0b513 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Wed, 27 Mar 2013 14:55:30 -0700 Subject: [PATCH] -getSize now returns an `unsigned long long`. This type now matches the type and width of the value returned by the `fileSize` accessor of the `NSDictionary (NSFileAttributes)` category (which is what is used when accumulating the total cache size). --- SDWebImage/SDImageCache.h | 2 +- SDWebImage/SDImageCache.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SDWebImage/SDImageCache.h b/SDWebImage/SDImageCache.h index 5b5fcd65..22ff04d0 100644 --- a/SDWebImage/SDImageCache.h +++ b/SDWebImage/SDImageCache.h @@ -134,7 +134,7 @@ typedef enum SDImageCacheType SDImageCacheType; /** * Get the size used by the disk cache */ -- (int)getSize; +- (unsigned long long)getSize; /** * Get the number of images in the disk cache diff --git a/SDWebImage/SDImageCache.m b/SDWebImage/SDImageCache.m index 8a5bc611..edfdce9d 100644 --- a/SDWebImage/SDImageCache.m +++ b/SDWebImage/SDImageCache.m @@ -284,9 +284,9 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week }); } --(int)getSize +-(unsigned long long)getSize { - int size = 0; + unsigned long long size = 0; NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath]; for (NSString *fileName in fileEnumerator) {