From 467be166718848dedabafc33f8e74bb0d3ab8605 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Tue, 8 Jun 2010 14:44:03 +0200 Subject: [PATCH] Fix some iOS 4.0 deprecated method use --- SDImageCache.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SDImageCache.m b/SDImageCache.m index 223793d9..d3583f59 100644 --- a/SDImageCache.m +++ b/SDImageCache.m @@ -30,7 +30,10 @@ static SDImageCache *instance; if (![[NSFileManager defaultManager] fileExistsAtPath:diskCachePath]) { - [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath attributes:nil]; + [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath + withIntermediateDirectories:YES + attributes:nil + error:NULL]; } // Init the operation queue @@ -179,7 +182,10 @@ static SDImageCache *instance; { [cacheInQueue cancelAllOperations]; [[NSFileManager defaultManager] removeItemAtPath:diskCachePath error:nil]; - [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath attributes:nil]; + [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath + withIntermediateDirectories:YES + attributes:nil + error:NULL]; } - (void)cleanDisk