You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/02/11 00:22:26 UTC
[14/17] git commit: iOS: Update for new file plugin api
iOS: Update for new file plugin api
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/4ca546b3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/4ca546b3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/4ca546b3
Branch: refs/heads/master
Commit: 4ca546b3d85d48f93b6b4325be8792685c6a76ed
Parents: 8374b3d
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Jan 23 22:37:27 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Jan 23 22:37:27 2014 -0500
----------------------------------------------------------------------
src/ios/CDVFileTransfer.m | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/4ca546b3/src/ios/CDVFileTransfer.m
----------------------------------------------------------------------
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<CDVFileSystem> *fs = [filePlugin.fileSystems objectAtIndex:sourceURL.fileSystemType];
+ NSObject<CDVFileSystem> *fs = [filePlugin filesystemForURL:sourceURL];
filePath = [fs filesystemPathForURL:sourceURL];
} else {
// Extract the path part out of a file: URL.