CB-6116: Fix error where resolveLocalFileSystemURL would sometimes fail to 
return


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/5e1e20a6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/5e1e20a6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/5e1e20a6

Branch: refs/heads/master
Commit: 5e1e20a61bd1b1064e345f09c4130824e9afb670
Parents: 1e1b530
Author: Ian Clelland <[email protected]>
Authored: Fri Feb 28 14:34:01 2014 -0500
Committer: Ian Clelland <[email protected]>
Committed: Fri Feb 28 14:34:01 2014 -0500

----------------------------------------------------------------------
 src/ios/CDVFile.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/5e1e20a6/src/ios/CDVFile.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVFile.m b/src/ios/CDVFile.m
index 0eca081..dfda68b 100644
--- a/src/ios/CDVFile.m
+++ b/src/ios/CDVFile.m
@@ -437,7 +437,7 @@ NSString* const kCDVFilesystemURLPrefix = @"cdvfile";
     } else {
         inputURI = [CDVFilesystemURL fileSystemURLWithString:localURIstr];
     }
-    if (inputURI != nil && inputURI.fileSystemName == nil) {
+    if (inputURI == nil || inputURI.fileSystemName == nil) {
         result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 
messageAsInt:ENCODING_ERR];
     } else {
         NSObject<CDVFileSystem> *fs = [self filesystemForURL:inputURI];

Reply via email to