Skip to content

Conversation

@bzoz
Copy link
Contributor

@bzoz bzoz commented Jan 3, 2019

Makes fileURLToPath use backslashes as path separator on Windows

Fixes: #25265

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Makes fileURLToPath use backslashes as path separator on Windows

Fixes: nodejs#25265
@nodejs-github-bot
Copy link
Collaborator

@bzoz
Copy link
Contributor Author

bzoz commented Jan 3, 2019

@lpinca
Copy link
Member

lpinca commented Jan 3, 2019

Failures are related.

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix.

const httpUrl = new URL('http://example.org');

// Check that the fileURLToPath uses platform separator
['file:///c:/tmp', 'file://tmp/tmp'].forEach((i) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem seems to be the file://tmp/tmp entry here being treated as invalid. Perhaps just make it file:///tmp/tmp?

@bzoz
Copy link
Contributor Author

bzoz commented Jan 7, 2019

Closing, #25349 has better tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fileURLToPath returns forward slashes on Windows

5 participants