Skip to content
Permalink
Browse files
CB-11693 ios: Run copy and move operations in the background thread
This closes #190
  • Loading branch information
Nikita Matrosov authored and vladimir-kotikov committed Aug 22, 2016
1 parent 3bc4945 commit 7a19febf0719fd941af6f4f1d9d0f5d8140b72af
Showing 1 changed file with 4 additions and 2 deletions.
@@ -797,8 +797,10 @@ - (void)doCopyMove:(CDVInvokedUrlCommand*)command isCopy:(BOOL)bCopy
}

__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];
}];
}];

}

1 comment on commit 7a19feb

@viking2009
Copy link

@viking2009 viking2009 commented on 7a19feb Aug 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do you plan to release a new version with this fix?

Please sign in to comment.