|
@@ -197,6 +197,9 @@
|
|
|
NSString *path = NSTemporaryDirectory();
|
|
NSString *path = NSTemporaryDirectory();
|
|
|
NSString *filePath = [path stringByAppendingPathComponent:self.filename];
|
|
NSString *filePath = [path stringByAppendingPathComponent:self.filename];
|
|
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
|
|
|
+ if ([fileManager fileExistsAtPath:filePath]) { // 文件存在就不会拷贝
|
|
|
|
|
+ [fileManager removeItemAtPath:filePath error:nil];
|
|
|
|
|
+ }
|
|
|
[fileManager copyItemAtPath:localPath toPath:filePath error:nil];
|
|
[fileManager copyItemAtPath:localPath toPath:filePath error:nil];
|
|
|
self.url = filePath;
|
|
self.url = filePath;
|
|
|
}
|
|
}
|