satyarohith / sift

Sift is a routing and utility library for Deno Deploy.

Home Page:https://deno.land/x/sift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

serveStatic rewrites file as directory when `:filename+` is missing in the path

satyarohith opened this issue · comments

@satyarohith it seems like there is still an issue with the implementation.

Using the snippet above, I get..

"Not a directory (os error 20), open '[my_path]/index.html/'"

It tries to resolve to ./index.html/ instead of the intended ./index.html.

Lines 165-167 in mod.ts append a / to any route when params?.fileName is null, which it seems to always be.

Originally posted by @organic-software in #39 (comment)