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 serveStatic method #77

Merged
merged 3 commits into from
Feb 16, 2024
Merged

fix serveStatic method #77

merged 3 commits into from
Feb 16, 2024

Conversation

hironichu
Copy link
Contributor

Description

This PR fixes a small issue running Danet on windows using the serveStatic method.
image

On windows when we use Deno.cwd() we get the full path of the OS starting with C:\...

This added a \ before C:\ which resolved in a invalid path :
/C:\Users\xxxx\Documents\Projects\xxxx/assets/manifest.json

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have run deno lint AND deno fmt AND deno task test and got no
    errors.
  • I have followed the contributing guidelines of this project as mentioned
    in CONTRIBUTING.md
  • I have checked to ensure there aren't other open
    Pull Requests for the same
    update/change?
  • I have performed a self-review of my own code
  • I have made corresponding changes needed to the documentation

@hironichu
Copy link
Contributor Author

Wait should this PR be merged in V2 branch.. ?

@Sorikairox
Copy link
Collaborator

Sorikairox commented Feb 16, 2024

@hironichu Thank you for your PR !

No worries, the V2 branch is obsolete, main branch is V2.

Unfortunately, your fix indeed fix windows, but also break everything else 😢

I added a condition, if we're not on windows we prepend the /

@Sorikairox Sorikairox merged commit 2e9461c into Savory:main Feb 16, 2024
1 check passed
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