Skip to content

Commit

Permalink
Use the good old NSTemporaryDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhuy committed Aug 15, 2017
1 parent 2ac6ed8 commit bc042f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Classes/PINRemoteImageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ - (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfi
//remove the old version of the disk cache
NSURL *diskCacheURL = [PINDiskCache cacheURLWithRootPath:cacheURLRoot prefix:PINDiskCachePrefix name:kPINRemoteImageDiskCacheName];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *dstURL = [[fileManager temporaryDirectory] URLByAppendingPathComponent:kPINRemoteImageDiskCacheName];
NSURL *dstURL = [[[NSURL alloc] initFileURLWithPath:NSTemporaryDirectory()] URLByAppendingPathComponent:kPINRemoteImageDiskCacheName];
[fileManager moveItemAtURL:diskCacheURL toURL:dstURL error:nil];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[fileManager removeItemAtURL:dstURL error:nil];
Expand Down

0 comments on commit bc042f2

Please sign in to comment.