Skip to content

Commit 4e0d4f7

Browse files
holland01kripken
authored andcommitted
Incoming (#4274)
* issue 4254; comitting fix * PR modifications for code standards * Update AUTHORS
1 parent 05b0071 commit 4e0d4f7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,4 @@ a license to everyone to use it as detailed in LICENSE.)
245245
* Pieter Vantorre <pietervantorre@gmail.com>
246246
* Maher Sallam <maher@sallam.me>
247247
* Andrey Burov <burik666@gmail.com>
248+
* Holland Schutte <hgschutte1@gmail.com>

src/library_workerfs.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ mergeInto(LibraryManager.library, {
1515
var parent = root;
1616
for (var i = 0; i < parts.length-1; i++) {
1717
var curr = parts.slice(0, i+1).join('/');
18+
// Issue 4254: Using curr as a node name will prevent the node
19+
// from being found in FS.nameTable when FS.open is called on
20+
// a path which holds a child of this node,
21+
// given that all FS functions assume node names
22+
// are just their corresponding parts within their given path,
23+
// rather than incremental aggregates which include their parent's
24+
// directories.
1825
if (!createdParents[curr]) {
19-
createdParents[curr] = WORKERFS.createNode(parent, curr, WORKERFS.DIR_MODE, 0);
26+
createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0);
2027
}
2128
parent = createdParents[curr];
2229
}

0 commit comments

Comments
 (0)