|
|
@@ -364,7 +364,14 @@
|
|
|
NSString *cachePath = [NSString stringWithFormat:@"%@/%@/%@",[RAUtils appCacheDirectory],self.name,img];
|
|
|
|
|
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
|
- [fileManager moveItemAtPath:tmpPath toPath:cachePath error:nil];
|
|
|
+ [fileManager createDirectoryAtPath:[cachePath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil];
|
|
|
+ NSError *err;
|
|
|
+ BOOL res = [fileManager moveItemAtPath:tmpPath toPath:cachePath error:&err];
|
|
|
+ if (res) {
|
|
|
+ DebugLog(@"move tmp to cache");
|
|
|
+ } else {
|
|
|
+ DebugLog(@"move tmp to cache failed %@",err);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#pragma mark - Image Picker Button Action
|