move instead of copy for much improved perf

This commit is contained in:
Kyle Corbitt 2016-03-31 13:50:03 -07:00
parent 13384afdcf
commit 9537056157
1 changed files with 4 additions and 4 deletions

View File

@ -689,8 +689,8 @@ didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL
NSFileManager * fileManager = [NSFileManager defaultManager];
NSError * error = nil;
//copying destination
if (!([fileManager copyItemAtPath:[outputFileURL path] toPath:fullPath error:&error])) {
//moving to destination
if (!([fileManager moveItemAtPath:[outputFileURL path] toPath:fullPath error:&error])) {
self.videoReject(RCTErrorUnspecified, nil, RCTErrorWithMessage(error.description));
return;
}
@ -703,8 +703,8 @@ didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL
NSFileManager * fileManager = [NSFileManager defaultManager];
NSError * error = nil;
//copying destination
if (!([fileManager copyItemAtPath:[outputFileURL path] toPath:fullPath error:&error])) {
//moving to destination
if (!([fileManager moveItemAtPath:[outputFileURL path] toPath:fullPath error:&error])) {
self.videoReject(RCTErrorUnspecified, nil, RCTErrorWithMessage(error.description));
return;
}