Skip to content

Commit ab42f3e

Browse files
committed
[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.
1 parent 99ade61 commit ab42f3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

www/DirectoryEntry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var argscheck = require('cordova/argscheck'),
3838
var DirectoryEntry = function(name, fullPath, fileSystem, nativeURL) {
3939

4040
// add trailing slash if it is missing
41-
if (!/\/$/.test(fullPath)) {
41+
if ((fullPath) && !/\/$/.test(fullPath)) {
4242
fullPath += "/";
4343
}
4444
// add trailing slash if it is missing

0 commit comments

Comments
 (0)