make PATH.resolve return an error result on paths with '' portions
This commit is contained in:
Родитель
53726c8ed5
Коммит
59932ef8aa
|
@ -85,7 +85,7 @@ mergeInto(LibraryManager.library, {
|
|||
if (typeof path !== 'string') {
|
||||
throw new TypeError('Arguments to path.resolve must be strings');
|
||||
} else if (!path) {
|
||||
continue;
|
||||
return ''; // an invalid portion invalidates the whole thing
|
||||
}
|
||||
resolvedPath = path + '/' + resolvedPath;
|
||||
resolvedAbsolute = path.charAt(0) === '/';
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
|
||||
isRoot: false
|
||||
exists: true
|
||||
error: 0
|
||||
path: /abc
|
||||
name: abc
|
||||
object.contents: ["123","456","deviceA","localLink","rootLink","relativeLink"]
|
||||
parentExists: true
|
||||
parentPath: /
|
||||
parentObject.contents: ["tmp","dev","forbidden","abc","def"]
|
||||
|
||||
/
|
||||
isRoot: true
|
||||
exists: true
|
||||
|
|
|
@ -31,7 +31,6 @@ function explore(path) {
|
|||
}
|
||||
|
||||
FS.currentPath = '/abc';
|
||||
explore('');
|
||||
explore('/');
|
||||
explore('.');
|
||||
explore('..');
|
||||
|
|
Загрузка…
Ссылка в новой задаче