Skip to content

Commit

Permalink
Fix test_unlink
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Dec 16, 2024
1 parent de946f2 commit 99fb293
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/library_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ FS.staticInit();
#endif
parent.node_ops.rmdir(parent, name);
FS.destroyNode(node);
node.parent = null;
#if FS_DEBUG
if (FS.trackingDelegate['onDeletePath']) {
FS.trackingDelegate['onDeletePath'](path);
Expand All @@ -895,6 +896,9 @@ FS.staticInit();
FS.readdirNode(FS.lookupPath(path, { follow: true }).node);
},
readdirNode(node) {
if (!node.parent) {
return [];
}
if (!node.node_ops.readdir) {
throw new FS.ErrnoError({{{ cDefs.ENOTDIR }}});
}
Expand Down

0 comments on commit 99fb293

Please sign in to comment.