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

fix(http/file_server): resolve empty subdir correctly on Windows #3439

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

Chocobo1
Copy link
Contributor

@Chocobo1 Chocobo1 commented Jun 9, 2023

One goal of this commit is to avoid tripping over the 'current directory read permission' prompt from deno.
The prompt should not happen in the case when we already specified a path to the --allow-read argument.
This prompt can be seen when navigating to a subdir in a browser while running a deno server from Windows. This is because file_server mixed different path separators when building paths and then pass it to Deno.stat(). However Deno.stat() doesn't seem to handle it well and therefore generated the prompt.

One goal of this commit is to avoid tripping over the 'current directory read permission' prompt
from deno.
The prompt should not happen in the case when we already specified a path to the `--allow-read`
argument.
This prompt can be seen when navigating to a subdir in a browser while running a deno server
from Windows. This is because file_server mixed different path separators when building
paths and then pass it to `Deno.stat()`. However `Deno.stat()` doesn't seem to handle it well
and therefore generated the prompt.
kt3k added a commit to kt3k/deno_std that referenced this pull request Jun 13, 2023
kt3k added a commit to kt3k/deno_std that referenced this pull request Jun 13, 2023
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@kt3k
Copy link
Member

kt3k commented Jun 14, 2023

ref #3444

@kt3k kt3k merged commit 8bd34c3 into denoland:main Jun 14, 2023
@Chocobo1 Chocobo1 deleted the path branch June 14, 2023 10:23
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