Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #16226 [filesystem] makeRelativePath does not work correctly from…
… root (jaytaph, fabpot) This PR was merged into the 2.3 branch. Discussion ---------- [filesystem] makeRelativePath does not work correctly from root | Q | A | ------------- | --- | Bug fix? | yes/no | New feature? | yes/no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #1234 | License | MIT | Doc PR | #14066, #14067 When using `makeRelativePath`, it returns an incorrect path when trying to fetch an entry from the root: $fs->makePathRelative('/foo/bar/baz', '/'); Actual result: ../foo/bar/baz Expected result: foo/bar/baz As we have specified an absolute path, there is no point on having an `..` added. It works, because a root directory has a `..` which points to itself, but it could result in issues when the relative path is actually prefixed or concatted. Commits ------- 791b124 fixed CS 7bb394e Added separated handling of root paths
- Loading branch information