summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorIgor Klopov <igor@klopov.com>2016-03-27 20:12:35 +0300
committerJames M Snell <jasnell@gmail.com>2016-04-18 16:16:47 -0700
commit4c234df264195b4cbd63fc5593e6e3468844f904 (patch)
treeda1ef3d9cfdcb5c3fd41fa0fda77d486584d02ea /doc
parenta974e852c6882c911ca6e3b647f1587400282413 (diff)
downloadandroid-node-v8-4c234df264195b4cbd63fc5593e6e3468844f904.tar.gz
android-node-v8-4c234df264195b4cbd63fc5593e6e3468844f904.tar.bz2
android-node-v8-4c234df264195b4cbd63fc5593e6e3468844f904.zip
doc: path.resolve ignores zero-length strings
https://github.com/nodejs/node/blob/master/lib/path.js#L187 https://github.com/nodejs/node/blob/master/lib/path.js#L1189 PR-URL: https://github.com/nodejs/node/pull/5928 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/path.markdown6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/api/path.markdown b/doc/api/path.markdown
index 9188e042d8..49cff7a8be 100644
--- a/doc/api/path.markdown
+++ b/doc/api/path.markdown
@@ -294,7 +294,8 @@ If `to` isn't already absolute `from` arguments are prepended in right to left
order, until an absolute path is found. If after using all `from` paths still
no absolute path is found, the current working directory is used as well. The
resulting path is normalized, and trailing slashes are removed unless the path
-gets resolved to the root directory.
+gets resolved to the root directory. Empty string `from` arguments are
+ignored.
Another way to think of it is as a sequence of `cd` commands in a shell.
@@ -329,9 +330,6 @@ path.resolve('wwwroot', 'static_files/png/', '../gif/image.gif')
// '/home/myself/node/wwwroot/static_files/gif/image.gif'
```
-*Note:* If the arguments to `resolve` have zero-length strings then the current
- working directory will be used instead of them.
-
## path.sep
The platform-specific file separator. `'\\'` or `'/'`.