Repository: cordova-plugin-file Updated Branches: refs/heads/master b15778749 -> da50f4911
[CB-7418][DirectoryEntry] Added fullPath variable as part of condition As well as NativeURL property, the fullPath variable should be part of the condition to avoid that a null value becomes a path, by adding a slash at the end of the undefined string. So in order to add a slash to it, fullPath should contain a value. 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/ab42f3e7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/ab42f3e7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/ab42f3e7 Branch: refs/heads/master Commit: ab42f3e7c6c2282ac303e32260e8d68fdd2e18e3 Parents: 99ade61 Author: Martin Gonzalez <[email protected]> Authored: Wed Aug 27 17:34:05 2014 -0500 Committer: Martin Gonzalez <[email protected]> Committed: Wed Aug 27 17:34:05 2014 -0500 ---------------------------------------------------------------------- www/DirectoryEntry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/ab42f3e7/www/DirectoryEntry.js ---------------------------------------------------------------------- diff --git a/www/DirectoryEntry.js b/www/DirectoryEntry.js index 8852be2..62f468a 100644 --- a/www/DirectoryEntry.js +++ b/www/DirectoryEntry.js @@ -38,7 +38,7 @@ var argscheck = require('cordova/argscheck'), var DirectoryEntry = function(name, fullPath, fileSystem, nativeURL) { // add trailing slash if it is missing - if (!/\/$/.test(fullPath)) { + if ((fullPath) && !/\/$/.test(fullPath)) { fullPath += "/"; } // add trailing slash if it is missing
