Improved by using makeDiskCachePath
This commit is contained in:
parent
737140d4cb
commit
d7bc2c0036
|
@ -84,8 +84,8 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||
}
|
||||
|
||||
- (id)initWithNamespace:(NSString *)ns {
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
return [self initWithNamespace:ns diskCacheDirectory:paths[0]];
|
||||
NSString *path = [self makeDiskCachePath:ns];
|
||||
return [self initWithNamespace:ns diskCacheDirectory:path];
|
||||
}
|
||||
|
||||
- (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory {
|
||||
|
@ -112,8 +112,8 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||
}
|
||||
else
|
||||
{
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
_diskCachePath = [paths[0] stringByAppendingString:fullNamespace];
|
||||
NSString *path = [self makeDiskCachePath:ns];
|
||||
_diskCachePath = path;
|
||||
}
|
||||
|
||||
// Set decompression to YES
|
||||
|
|
Loading…
Reference in New Issue