You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2016/08/22 09:01:13 UTC
cordova-plugin-file git commit: CB-11693 ios: Run copy and move
operations in the background thread
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 <ni...@rp.ru>
Authored: Tue Aug 16 10:35:49 2016 +0300
Committer: Vladimir Kotikov <ko...@gmail.com>
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: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org