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

Use OS specific path separator #1038

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Use OS specific path separator #1038

merged 1 commit into from
Oct 17, 2024

Conversation

kumaranvpl
Copy link
Contributor

@kumaranvpl kumaranvpl commented Oct 17, 2024

In the web_component.py file, an os specific path is constructed at line 33 using os.path.join.

But immediately the path is checked whether it starts with "/" or not. "/" is a linux specific path separator and ideally the code should use os specific path separator.

This PR fixes that issue.

Because of this issue, in windows, full_path \some\dir\file.js becomes /\some\dir\file.js and later when converted to a URL it becomes http://host:port//some/dir/file.js which is not really a valid URL.

Copy link

google-cla bot commented Oct 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@wwwillchen wwwillchen merged commit e6f940c into google:main Oct 17, 2024
6 checks passed
@wwwillchen
Copy link
Collaborator

thanks!

@kumaranvpl
Copy link
Contributor Author

thanks!

@wwwillchen No problem. Happy to contribute.

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.

2 participants