node icon indicating copy to clipboard operation
node copied to clipboard

Revert "path: fix bugs and inconsistencies"

Open redyetidev opened this issue 4 months ago • 17 comments

This (uncleanly) reverts commit efbba60.

Fixes #55410


The commit efbba60 introduced a change where paths would retain trailing / characters. This change led to issues in npm and likely other libraries, because trailing / characters are not typically expected to be preserved.

The purpose of using resolve() on a path is to fully resolve it to its canonical form, regardless of how it is written (e.g., both /hello/../world and /hello/../hello/../world should resolve to the same path). However, this commit altered that behavior, making /hello/ resolve differently from /hello. That made the resolution of identical paths (one with / and one without) return different results. This reverts that behavior

redyetidev avatar Oct 17 '24 01:10 redyetidev