Skip to content

Commit 50df052

Browse files
tniessenrichardlau
authored andcommitted
doc: note that path.normalize deviates from POSIX
PR-URL: #51513 Refs: #51345 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 133719b commit 50df052

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/path.md

+8
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,14 @@ instance of the platform-specific path segment separator (`/` on POSIX and
361361
If the `path` is a zero-length string, `'.'` is returned, representing the
362362
current working directory.
363363

364+
On POSIX, the types of normalization applied by this function do not strictly
365+
adhere to the POSIX specification. For example, this function will replace two
366+
leading forward slashes with a single slash as if it was a regular absolute
367+
path, whereas a few POSIX systems assign special meaning to paths beginning with
368+
exactly two forward slashes. Similarly, other substitutions performed by this
369+
function, such as removing `..` segments, may change how the underlying system
370+
resolves the path.
371+
364372
For example, on POSIX:
365373

366374
```js

0 commit comments

Comments
 (0)