Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Sosnowski <bartosz@janeasystems.com>2017-06-06 12:19:23 +0300
committerBartosz Sosnowski <bartosz@janeasystems.com>2017-06-06 12:19:23 +0300
commit422722ff67fc29e1cfd212d183a9594f8869de7f (patch)
tree191395c0254bde2d0bdeb41e210fb393bcb43f7c /doc/api/path.md
parentf1199c2bb4fe07fd9fdba3d6728f4791f66b2ea7 (diff)
win, doc: document per-drive current working dir
Add note to fs.md and path.md about Windows using per-drive current working directory. Fixes: https://github.com/nodejs/node/issues/9378 PR-URL: https://github.com/nodejs/node/pull/13330 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'doc/api/path.md')
-rw-r--r--doc/api/path.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/path.md b/doc/api/path.md
index cf096ef9851..0bc6c88ded3 100644
--- a/doc/api/path.md
+++ b/doc/api/path.md
@@ -54,6 +54,12 @@ path.posix.basename('/tmp/myfile.html');
// Returns: 'myfile.html'
```
+*Note:* On Windows Node.js follows the concept of per-drive working directory.
+This behavior can be observed when using a drive path without a backslash. For
+example `path.resolve('c:\\')` can potentially return a different result than
+`path.resolve('c:')`. For more information, see
+[this MSDN page][MSDN-Rel-Path].
+
## path.basename(path[, ext])
<!-- YAML
added: v0.1.25
@@ -550,3 +556,4 @@ of the `path` methods.
[`path.posix`]: #path_path_posix
[`path.sep`]: #path_path_sep
[`path.win32`]: #path_path_win32
+[MSDN-Rel-Path]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#fully_qualified_vs._relative_paths