doc: make path.relative stricter#13714
Closed
DuanPengfei wants to merge 2 commits intonodejs:masterfrom
Closed
Conversation
think of this situation: you are current under root path and you do
```
path.relative('../../../../../x', '../../y');
```
`path.relative` can't fictitious a path for the result, so it's based
on current working directory.
refack
approved these changes
Jun 16, 2017
mscdex
reviewed
Jun 16, 2017
doc/api/path.md
Outdated
| 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 current working directory. If `from` and `to` each resolve to the same path |
Member
|
This fixes #13683 |
addaleax
approved these changes
Jun 16, 2017
XadillaX
approved these changes
Jun 16, 2017
cjihrig
approved these changes
Jun 16, 2017
jasnell
approved these changes
Jun 16, 2017
4 tasks
Contributor
Author
|
/ping @refack |
Contributor
Yes. |
refack
pushed a commit
to refack/node
that referenced
this pull request
Jun 19, 2017
PR-URL: nodejs#13714 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Contributor
|
Landed in 6e69421 |
addaleax
pushed a commit
that referenced
this pull request
Jun 20, 2017
PR-URL: #13714 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
addaleax
pushed a commit
that referenced
this pull request
Jun 21, 2017
PR-URL: #13714 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
DuanPengfei
added a commit
to souche-koumakan/node
that referenced
this pull request
Jun 22, 2017
Throw an error `ERR_UNSUPPORTED_PLATFOMR` when direct use `path.posix.resolve` on Windows or direct use `path.win32.resolve` on *nix. Update docs, list win32 functions do not support direct use on *nix and posix functions do not support direct use on Windows. Update tests, only run current platform type test. Fixes: nodejs#13683 Refs: nodejs#13714
MylesBorins
pushed a commit
that referenced
this pull request
Jul 17, 2017
PR-URL: #13714 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Contributor
|
I.ve backported to v6.x. If it shouldn't have been backported let me know and I'll rebase it out |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


think of this situation: you are current under root path and you do
path.relativecan't fictitious a path for the result, so it's basedon current working directory.
Checklist
Affected core subsystem(s)
doc, path