GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: add UNC support to url.pathToFileURL() by mceachen · Pull Request #34743 · nodejs/node

Conversation

@mceachen

@mceachen mceachen commented Aug 12, 2020

Copy link
Copy Markdown
Contributor

Fixes: #34736

Checklist
  • make -j4 test (UNIX) passes
  • vcbuild test (Windows) passes
  • tests are included
  • commit message follows commit guidelines
  • certified Developer's Certificate of Origin 1.1

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

DerekNonGeneric, Leko, and bricss reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
@mceachen
lib: add UNC support to url.pathToFileURL()
80d42fc
Fixes: #34736
guybedford
guybedford approved these changes Aug 12, 2020
View reviewed changes

@guybedford guybedford left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This looks great to me, thank you so much @mceachen for the PR.

Let's get a review from @jasnell as well to land.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@guybedford
guybedford requested a review from jasnell August 12, 2020 02:02
jasnell
jasnell approved these changes Aug 12, 2020
View reviewed changes
@mceachen

mceachen commented Aug 12, 2020

Copy link
Copy Markdown
Contributor Author

Seems like test-asan failed from something not related to this PR:

=== release test ===
Path: node-api/test_worker_terminate_finalization/test
##[error]--- stderr ---
=================================================================
==107572==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0xa1d80d in operator new(unsigned long) (/home/runner/work/node/node/out/Release/node+0xa1d80d)
    #1 0xb5bf63 in napi_create_reference (/home/runner/work/node/node/out/Release/node+0xb5bf63)
    #2 0x7f5a275d1878  (<unknown module>)
    #3 0xb47492 in v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) (/home/runner/work/node/node/out/Release/node+0xb47492)
    #4 0x1268a73 in v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) (/home/runner/work/node/node/out/Release/node+0x1268a73)
    #5 0x12668a4 in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) (/home/runner/work/node/node/out/Release/node+0x12668a4)
    #6 0x1264932 in v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) (/home/runner/work/node/node/out/Release/node+0x1264932)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rickyes rickyes added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Aug 12, 2020
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 12, 2020
@nodejs-github-bot

nodejs-github-bot commented Aug 12, 2020 •
edited by rickyes
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32742/ (💚)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Aug 12, 2020

Copy link
Copy Markdown
Member

@mceachen ... yeah, that's a known issue. A fix is pending.

mceachen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca reviewed Aug 12, 2020
View reviewed changes
Comment thread lib/internal/url.js Outdated
function encodePathChars(filepath) {
if (filepath.includes('%'))
filepath = filepath.replace(percentRegEx, '%25');
// In posix, "/" is a valid character in paths

@lpinca lpinca Aug 12, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
// In posix, "/" is a valid character in paths
// In posix, "\" is a valid character in paths

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

himself65 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@mceachen mceachen Aug 12, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ah, good catch. I just moved this comment, btw, when I refactored out the function. Will fix.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/internal/url.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-url-pathtofileurl.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca approved these changes Aug 12, 2020
View reviewed changes
@mceachen
Update url.js
94a2126
fix mistake in comment
@mceachen

mceachen commented Aug 13, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews! Is there anything else I need to do for this PR? (I haven't committed to this project before).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 13, 2020
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 13, 2020
@nodejs-github-bot

nodejs-github-bot commented Aug 14, 2020

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/32772/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott approved these changes Aug 14, 2020
View reviewed changes
Trott pushed a commit that referenced this pull request Aug 14, 2020
@mceachen @Trott
lib: add UNC support to url.pathToFileURL()
7b8c6b0
Fixes: #34736

PR-URL: #34743
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@Trott

Trott commented Aug 14, 2020

Copy link
Copy Markdown
Member

Landed in 7b8c6b0.

Thanks for the contribution! 🎉

mceachen reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott closed this Aug 14, 2020
MylesBorins pushed a commit that referenced this pull request Aug 17, 2020
@mceachen @MylesBorins
lib: add UNC support to url.pathToFileURL()
72e7380
Fixes: #34736

PR-URL: #34743
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@danielleadams danielleadams mentioned this pull request Aug 20, 2020
V14.9.0 proposal #34852
Merged
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
@mceachen @BethGriggs
lib: add UNC support to url.pathToFileURL()
1a9496a
Fixes: #34736

PR-URL: #34743
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
@mceachen @addaleax
lib: add UNC support to url.pathToFileURL()
418ff2d
Fixes: #34736

PR-URL: #34743
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
@mceachen @addaleax
lib: add UNC support to url.pathToFileURL()
f29ab40
Fixes: #34736

PR-URL: #34743
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
v12.19.0 proposal #35401
Merged
@qodo-code-review qodo-code-review Bot mentioned this pull request Aug 12, 2026
SOU-242: pin packaged file: renderer trust to the index.html path soufelhanafi/centresoutien#201
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@guybedford guybedford guybedford approved these changes
@Trott Trott Trott approved these changes
@lpinca lpinca lpinca approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

lib / src Issues and PRs involving general changes in the lib/ or src/ directories.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

url.pathToFileURL doesn't generate valid URLs for UNC paths

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@mceachen @nodejs-github-bot @jasnell @Trott @guybedford @lpinca @rickyes
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.