You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/08/28 19:20:23 UTC

git commit: [CB-7375] Remove leading slash statement from condition

Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master da50f4911 -> 36134d48c


[CB-7375] Remove leading slash statement from condition

Windows Phone file paths starts with a leading slash, if the path is an
invalid one, the native side it will report a error callback with the
respective error code.


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

Branch: refs/heads/master
Commit: 36134d48c1864278eb99add9db5a7ca8a4445f74
Parents: da50f49
Author: Martin Gonzalez <ma...@gmail.com>
Authored: Thu Aug 28 11:26:24 2014 -0500
Committer: Martin Gonzalez <ma...@gmail.com>
Committed: Thu Aug 28 11:26:24 2014 -0500

----------------------------------------------------------------------
 www/resolveLocalFileSystemURI.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/36134d48/www/resolveLocalFileSystemURI.js
----------------------------------------------------------------------
diff --git a/www/resolveLocalFileSystemURI.js b/www/resolveLocalFileSystemURI.js
index 334748a..3a41210 100644
--- a/www/resolveLocalFileSystemURI.js
+++ b/www/resolveLocalFileSystemURI.js
@@ -40,7 +40,7 @@ module.exports.resolveLocalFileSystemURL = function(uri, successCallback, errorC
     };
     // sanity check for 'not:valid:filename' or '/not:valid:filename'
     // file.spec.12 window.resolveLocalFileSystemURI should error (ENCODING_ERR) when resolving invalid URI with leading /.
-    if(!uri || uri.split(":").length > 2 || uri.indexOf('/') == 0) {
+    if(!uri || uri.split(":").length > 2) {
         setTimeout( function() {
             fail(FileError.ENCODING_ERR);
         },0);