diff --git a/src/ios/CDVFileTransfer.m b/src/ios/CDVFileTransfer.m index de3a8bd..1ae0730 100644 --- a/src/ios/CDVFileTransfer.m +++ b/src/ios/CDVFileTransfer.m @@ -617,9 +617,9 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream) // Download response is okay; begin streaming output to file NSString *filePath = nil; CDVFilesystemURL *sourceURL = [CDVFilesystemURL fileSystemURLWithString:self.target]; - if (sourceURL && sourceURL.fileSystemType != -1) { + if (sourceURL && sourceURL.fileSystemName != nil) { // This requires talking to the current CDVFile plugin - NSObject *fs = [filePlugin.fileSystems objectAtIndex:sourceURL.fileSystemType]; + NSObject *fs = [filePlugin filesystemForURL:sourceURL]; filePath = [fs filesystemPathForURL:sourceURL]; } else { // Extract the path part out of a file: URL.