mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
fs: fix readdir failure when libuv returns UV_DIRENT_UNKNOWN
Fixes: https://github.com/nodejs/node/issues/33348 PR-URL: https://github.com/nodejs/node/pull/33395 Refs: https://github.com/nodejs/node/issues/33348 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
b831b081c4
commit
82f13fa803
3 changed files with 182 additions and 3 deletions
17
test/parallel/test-fs-readdir-buffer.js
Normal file
17
test/parallel/test-fs-readdir-buffer.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
const common = require('../common');
|
||||
const fs = require('fs');
|
||||
|
||||
if (!common.isOSX) {
|
||||
common.skip('this tests works only on MacOS');
|
||||
}
|
||||
|
||||
const assert = require('assert');
|
||||
|
||||
fs.readdir(
|
||||
Buffer.from('/dev'),
|
||||
{ withFileTypes: true, encoding: 'buffer' },
|
||||
common.mustCall((e, d) => {
|
||||
assert.strictEqual(e, null);
|
||||
})
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue