-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
win, doc: document per-drive current working dir #13330
Conversation
Add note to fs.md and path.md about Windows using per-drive current working directory. Fixes: nodejs#9378
doc/api/fs.md
Outdated
@@ -94,6 +94,12 @@ Error: EISDIR: illegal operation on a directory, read | |||
<stack trace.> | |||
``` | |||
|
|||
*Note:* On Windows Node follows the concept of per-drive working directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Node.js
although it's probably enough to just say Windows follows...
as Node.js is not doing anything different from the OS behavior.
doc/api/path.md
Outdated
@@ -54,6 +54,11 @@ path.posix.basename('/tmp/myfile.html'); | |||
// Returns: 'myfile.html' | |||
``` | |||
|
|||
*Note:* On Windows Node follows the concept of per-drive working directory. | |||
This behavior can be observed when using a drive path without backslash, e.g. | |||
`path.resolve('c:\\')` can potentially return different result than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return different -> return a different
doc/api/path.md
Outdated
@@ -54,6 +54,11 @@ path.posix.basename('/tmp/myfile.html'); | |||
// Returns: 'myfile.html' | |||
``` | |||
|
|||
*Note:* On Windows Node follows the concept of per-drive working directory. | |||
This behavior can be observed when using a drive path without backslash, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without backslash -> without a backslash
doc/api/fs.md
Outdated
@@ -94,6 +94,12 @@ Error: EISDIR: illegal operation on a directory, read | |||
<stack trace.> | |||
``` | |||
|
|||
*Note:* On Windows Node follows the concept of per-drive working directory. | |||
This behavior can be observed when using a drive path without backslash, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: ,
-> .
and e.g.
-> For example,
.
doc/api/fs.md
Outdated
@@ -94,6 +94,12 @@ Error: EISDIR: illegal operation on a directory, read | |||
<stack trace.> | |||
``` | |||
|
|||
*Note:* On Windows Node follows the concept of per-drive working directory. | |||
This behavior can be observed when using a drive path without backslash, e.g. | |||
`fs.readdirSync('c:\\')` can potentially return different result than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return different result
-> return a different result
doc/api/fs.md
Outdated
*Note:* On Windows Node follows the concept of per-drive working directory. | ||
This behavior can be observed when using a drive path without backslash, e.g. | ||
`fs.readdirSync('c:\\')` can potentially return different result than | ||
`fs.readdirSync('c:')`. For more information see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
,
after information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with (or without) nits addressed.
Updated, PTAL |
Landed in 422722f |
This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace do-not-land if it is being backported |
Add note to
fs.md
andpath.md
about Windows using per-drive current working directory.Fixes: #9378
Checklist
Affected core subsystem(s)
doc