Merge pull request #1676 from jimmaye/background-crash-io10
#1619: Adds NSError as input to resourceValuesForKeys:error: method
This commit is contained in:
commit
fc3a4d8170
|
@ -504,10 +504,11 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||
// 2. Storing file attributes for the size-based cleanup pass.
|
||||
NSMutableArray<NSURL *> *urlsToDelete = [[NSMutableArray alloc] init];
|
||||
for (NSURL *fileURL in fileEnumerator) {
|
||||
NSDictionary<NSString *, id> *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:NULL];
|
||||
NSError *error;
|
||||
NSDictionary<NSString *, id> *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:&error];
|
||||
|
||||
// Skip directories.
|
||||
if ([resourceValues[NSURLIsDirectoryKey] boolValue]) {
|
||||
// Skip directories and errors.
|
||||
if (error || [resourceValues[NSURLIsDirectoryKey] boolValue]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue