Update SDWebImageTestCache.m

Co-authored-by: DreamPiggy <lizhuoli1126@126.com>
This commit is contained in:
Tim Johnsen 2024-10-11 20:21:03 -07:00 committed by GitHub
parent e524ca0310
commit dcd0c46b7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ static NSString * const SDWebImageTestDiskCacheExtendedAttributeName = @"com.hac
- (void)removeExpiredData { - (void)removeExpiredData {
NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.config.maxDiskAge]; NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.config.maxDiskAge];
NSURL *diskCacheURL = [NSURL fileURLWithPath:self.cachePath isDirectory:YES]; NSURL *diskCacheURL = [NSURL fileURLWithPath:self.cachePath isDirectory:YES];
NSArray<NSString *> *resourceKeys = @[NSURLIsDirectoryKey, NSURLAttributeContentAccessDateKey]; NSArray<NSString *> *resourceKeys = @[NSURLIsDirectoryKey, NSURLContentAccessDateKey];
NSDirectoryEnumerator<NSURL *> *fileEnumerator = [self.fileManager enumeratorAtURL:diskCacheURL NSDirectoryEnumerator<NSURL *> *fileEnumerator = [self.fileManager enumeratorAtURL:diskCacheURL
includingPropertiesForKeys:resourceKeys includingPropertiesForKeys:resourceKeys
options:NSDirectoryEnumerationSkipsHiddenFiles options:NSDirectoryEnumerationSkipsHiddenFiles