Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve() is replacing spaces by %20 #21444

Closed
thiagodp opened this issue Jun 21, 2018 · 2 comments
Closed

resolve() is replacing spaces by %20 #21444

thiagodp opened this issue Jun 21, 2018 · 2 comments
Labels
invalid Issues and PRs that are invalid. path Issues and PRs related to the path subsystem. windows Issues and PRs related to the Windows platform.

Comments

@thiagodp
Copy link

  • Version: 8.11.2
  • Platform: Windows 10 64-bit
  • Subsystem: path.resolve()
console.log( path.resolve( '.', 'C:\\dir\\file with spaces.foo' ) );
console.log( path.resolve( '.', 'C:\\dir with spaces\\file with spaces.foo' ) );

Output:

c:/dir/file%20with%20spaces.foo
c:/dir%20with%20spaces/file%20with%20spaces.foo

Expected:

c:/dir/file with spaces.foo
c:/dir with spaces/file with spaces.foo
@ChALkeR ChALkeR added windows Issues and PRs related to the Windows platform. path Issues and PRs related to the path subsystem. labels Jun 21, 2018
@bnoordhuis
Copy link
Member

Can't reproduce and it seems highly unlikely that this is a bug in Node.js itself. Are you absolutely sure you're executing just those two lines? How are you executing your script?

@thiagodp
Copy link
Author

Sorry, there were two resolve() functions declared in the piece of code where the test was made, one of them included automatically by VSCode. So it was using url.resolve() instead of path.resolve().

@bnoordhuis bnoordhuis added the invalid Issues and PRs that are invalid. label Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid. path Issues and PRs related to the path subsystem. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

3 participants