From c90b59f3bfa66ddf3fee03824c638db479ba41a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Ekstr=C3=B6m?= Date: Mon, 19 Jun 2017 12:46:48 +0200 Subject: [PATCH] Remove inline string creation to fix nullability errors --- Sources/SPTPersistentCache.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SPTPersistentCache.m b/Sources/SPTPersistentCache.m index 9aa9956..779da76 100644 --- a/Sources/SPTPersistentCache.m +++ b/Sources/SPTPersistentCache.m @@ -1048,7 +1048,8 @@ - (NSMutableArray *)storedImageNamesAndAttributes NSNumber *fsize = [NSNumber numberWithLongLong:fileStat.st_size]; NSDictionary *values = @{NSFileModificationDate : mdate, NSFileSize: fsize}; - [images addObject:@{ SPTDataCacheFileNameKey : [NSString stringWithUTF8String:[theURL fileSystemRepresentation]], + NSString *cacheFilename = [NSString stringWithUTF8String:[theURL fileSystemRepresentation]]; + [images addObject:@{ SPTDataCacheFileNameKey : cacheFilename, SPTDataCacheFileAttributesKey : values }]; } } else {