私のコードは次のようになります。エラーをログに記録しようとすると、最後の行でアプリがクラッシュすることがあります。私は何を間違っていますか?
BOOL isDir;
NSError *error;
NSString *downloadPath = [[NSString stringWithFormat:@"%@/%@", [download downloadFolder], [download escapedTitle]] stringByExpandingTildeInPath];
NSFileManager *fileManager = [NSFileManager defaultManager];
if (![fileManager fileExistsAtPath:downloadPath isDirectory:&isDir])
{
[fileManager createDirectoryAtPath:downloadPath withIntermediateDirectories:YES attributes:nil error:&error];
if (error)
NSLog(@"%@", [error localizedDescription]);
}
コンソールからの出力も添付しました。