Make sure we send the error command if file not found.

This commit is contained in:
Seamus Campbell 2015-03-07 14:21:33 -08:00
parent 6d712ad889
commit caf3e6fda4

View File

@ -52,8 +52,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if(![fm fileExistsAtPath:localFile]) { if(![fm fileExistsAtPath:localFile]) {
NSDictionary *jsonObj = @{@"status" : @"9", NSDictionary *jsonObj = @{@"status" : @"9",
@"message" : @"File does not exist"}; @"message" : @"File does not exist"};
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
messageAsDictionary:jsonObj]; messageAsDictionary:jsonObj];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
return; return;
} }