mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00

Signed-off-by: tchetwin <tchetwin@bloomberg.net> PR-URL: https://github.com/nodejs/node/pull/55750 Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
19 lines
561 B
JavaScript
19 lines
561 B
JavaScript
'use strict';
|
|
|
|
const { PIPE, mustCall } = require('../common');
|
|
const tmpdir = require('../common/tmpdir');
|
|
const { test } = require('node:test');
|
|
const fs = require('node:fs');
|
|
const net = require('node:net');
|
|
|
|
test('readdir should not recurse into Unix domain sockets', (t, done) => {
|
|
tmpdir.refresh();
|
|
const server = net.createServer().listen(PIPE, mustCall(() => {
|
|
// The process should not crash
|
|
// See https://github.com/nodejs/node/issues/52159
|
|
fs.readdirSync(tmpdir.path, { recursive: true });
|
|
server.close();
|
|
done();
|
|
}));
|
|
});
|