Repository: cordova-plugin-file Updated Branches: refs/heads/master 3bc494559 -> 7a19febf0
CB-11693 ios: Run copy and move operations in the background thread This closes #190 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/7a19febf Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/7a19febf Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/7a19febf Branch: refs/heads/master Commit: 7a19febf0719fd941af6f4f1d9d0f5d8140b72af Parents: 3bc4945 Author: Nikita Matrosov <[email protected]> Authored: Tue Aug 16 10:35:49 2016 +0300 Committer: Vladimir Kotikov <[email protected]> Committed: Mon Aug 22 12:00:40 2016 +0300 ---------------------------------------------------------------------- src/ios/CDVFile.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/7a19febf/src/ios/CDVFile.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVFile.m b/src/ios/CDVFile.m index ce36069..59e7d64 100644 --- a/src/ios/CDVFile.m +++ b/src/ios/CDVFile.m @@ -797,8 +797,10 @@ NSString* const kCDVFilesystemURLPrefix = @"cdvfile"; } __weak CDVFile* weakSelf = self; - [destFs copyFileToURL:destURL withName:newName fromFileSystem:srcFs atURL:srcURL copy:bCopy callback:^(CDVPluginResult* result) { - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; + [self.commandDelegate runInBackground:^ { + [destFs copyFileToURL:destURL withName:newName fromFileSystem:srcFs atURL:srcURL copy:bCopy callback:^(CDVPluginResult* result) { + [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; + }]; }]; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
