Skip to content

Commit

Permalink
Fix some iOS 4.0 deprecated method use
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Poitrey committed Jun 8, 2010
1 parent 4fedcee commit 467be16
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions SDImageCache.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ - (id)init

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
Expand Down Expand Up @@ -179,7 +182,10 @@ - (void)clearDisk
{
[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
Expand Down

0 comments on commit 467be16

Please sign in to comment.