From b1dc7083aa39c07ae2c6c693d931c6cfeda3efe3 Mon Sep 17 00:00:00 2001 From: StefanStojanovic Date: Mon, 5 Sep 2022 18:29:41 +0200 Subject: [PATCH] build: add long paths awareness on windows Libuv has a manifest file to enable working with long paths. Node does not have that in its manifest and that leads to problems in some cases on Windows (eg. realpath.native). Windows long path test is also improved to cover the mentioned issue. Fixes: https://github.com/nodejs/node/issues/39721 --- src/res/node.exe.extra.manifest | 5 +++++ test/parallel/test-fs-long-path.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/res/node.exe.extra.manifest b/src/res/node.exe.extra.manifest index e2e9f175473305..8be0a7e830153e 100644 --- a/src/res/node.exe.extra.manifest +++ b/src/res/node.exe.extra.manifest @@ -14,4 +14,9 @@ + + + true + + diff --git a/test/parallel/test-fs-long-path.js b/test/parallel/test-fs-long-path.js index 1cb66fa6046152..3f808496ae53f2 100644 --- a/test/parallel/test-fs-long-path.js +++ b/test/parallel/test-fs-long-path.js @@ -43,4 +43,7 @@ console.log({ fs.writeFile(fullPath, 'ok', common.mustSucceed(() => { fs.stat(fullPath, common.mustSucceed()); + + // Tests https://github.com/nodejs/node/issues/39721 + fs.realpath.native(fullPath, common.mustSucceed()); }));