| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Congrats on your first contribution! 🎉 |
Sorry, something went wrong.
|
The git config was not set up properly, so I committed it again. 😅 |
Sorry, something went wrong.
There was a problem hiding this comment.
This one is simply very hard to fix without introducing more breaking changes. It might be more wise to consider dirent.path irremediably broken and switch to using dirent.parentPath which is stable.
Sorry, something went wrong.
There was a problem hiding this comment.
This change is not OK, we cannot make this kind of breaking change, especially on a maintenance LTS line. This needs to remain as it was on v18.19.1:
Sorry, something went wrong.
There was a problem hiding this comment.
I got it! I fixed in b2d61d8.
Many Thanks!
Sorry, something went wrong.
|
@aduh95 Thanks for the review!
Does the above mean modifying the readSyncRecursive function to use parentPath instead of path? // dir.js
readSyncRecursive(dirent) {
const ctx = { path: dirent.parentPath };
const handle = dirBinding.opendir(
pathModule.toNamespacedPath(dirent.parentPath),
this[kDirOptions].encoding,
undefined,
ctx,
);
handleErrorFromBinding(ctx);
const result = handle.read(
this[kDirOptions].encoding,
this[kDirOptions].bufferSize,
undefined,
ctx,
);
if (result) {
this.processReadResult(dirent.parentPath, result);
}
handle.close(undefined, ctx);
handleErrorFromBinding(ctx);
}Could you please help me a little more? |
Sorry, something went wrong.
No I meant for user land, Im unsure fixing it in Node.js is worth it |
Sorry, something went wrong.
The issue was caused by a modification in PR nodejs#51021, which included changes to the documentation for parentPath and modifications to display the file path. I have retained the content related to the documentation and removed the filepath part. Fixes: nodejs#52441 Co-authored-by: injae-kim <injae-kim@users.noreply.github.com>
An error occurred in the test/sequential/test-fs-opendir-recursive.js file after changing the code. This was resolved by referring to the code resolved in PR nodejs#49603. Refs: nodejs#49603
The getDirentPath function in test/sequential/test-fs-opendir-recursive.js has been reverted for stability. Refs: nodejs#53969 (comment)
Doesn't make sense this statement since on the sync version we have the correct behavior, unless you want to change the sync version. |
Sorry, something went wrong.
No that would be equally unwise IMO. What I'm saying is that dirent.path is inconsistent, and I don't see a way to fix the inconsistency without risking breaking more stuff. dirent.parentPath was introduced because dirent.path is inconsistent and unfortunately the ecosystem was/is relying on some of these inconsistencies. |
Sorry, something went wrong.
|
I will wait for the direction of the work to be decided. If you decide, please let me know! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This fixes the issue reported in #52441
The issue was caused by a modification in PR #51021 , which was working on including the parentPath in the documentation and modifying the path to display the filepath.
I have retained the content related to the documentation and removed the filepath part. Corresponding test code has also been updated accordingly.
An error occurred in the test/sequential/test-fs-opendir-recursive.js file after changing the code. This was resolved by referring to the code resolved in #49603 .
cc. @H4ad @daeyeon
Screenshots
AS-IS
You can see that even the file name is exposed in the path.
TO-BE
Now the file name has been removed from the path!
References