-
-
Notifications
You must be signed in to change notification settings - Fork 34k
lib: fix readdir in recursive mode with a buffer argument #60936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60936 +/- ##
==========================================
+ Coverage 88.53% 88.54% +0.01%
==========================================
Files 703 703
Lines 208546 208596 +50
Branches 40217 40238 +21
==========================================
+ Hits 184634 184701 +67
+ Misses 15926 15905 -21
- Partials 7986 7990 +4
🚀 New features to boost your workflow:
|
|
correct handling of buffer arguments in recursive readdir aligns the behavior with people's expectations and makes the fs API more consistent the Codecov report shows two uncovered lines in promises.js - adding a test for the recursive + Buffer path would close that gap and make the fix fully covered |
add a test with withFileTypes true Fixes: nodejs#60936
738b7ed to
36b64a5
Compare
add a test with withFileTypes true Fixes: nodejs#60936
calling readdir with a buffer arguemnt and the recursive flag produces an ERR_INVALID_ARG_TYPE error. This is to fix that. Fixes: nodejs#58892
add a test with withFileTypes true Fixes: nodejs#60936
fix failing tests in the previous commit Fixes: nodejs#60936
36b64a5 to
923d4f4
Compare
as CI is failing, make test fix Fixes: nodejs#60936
Fixes: #58892
Calling readdir with a Buffer argument and the recursive flag produces an ERR_INVALID_ARG_TYPE error. The expected behavior would be for the readdir functions not to error and return either an array of Buffers or Dirents (depending on options.withFileTypes)