Skip to content

Commit

Permalink
doc: path.relative uses cwd
Browse files Browse the repository at this point in the history
PR-URL: #13714
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
DuanPengfei authored and MylesBorins committed Jul 17, 2017
1 parent 71581e9 commit 24feb33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ added: v0.5.0
* `to` {string}
* Returns: {string}

The `path.relative()` method returns the relative path from `from` to `to`.
If `from` and `to` each resolve to the same path (after calling `path.resolve()`
on each), a zero-length string is returned.
The `path.relative()` method returns the relative path from `from` to `to` based
on the current working directory. If `from` and `to` each resolve to the same
path (after calling `path.resolve()` on each), a zero-length string is returned.

If a zero-length string is passed as `from` or `to`, the current working
directory will be used instead of the zero-length strings.
Expand Down

0 comments on commit 24feb33

Please sign in to comment.