static: is a file not a directory
benjiqq opened this issue · comments
Ben commented
in the case that the path is a file, not a dir, this error can be confusing https://github.com/encode/starlette/blob/master/starlette/staticfiles.py#L59C8-L59C81
Important
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
Marcelo Trylesinski commented
What?
Ben commented
if the path is a file it will say "Directory '{directory}' does not exist", which doesn't make sense. the path does exist its a file, not directory, so an error message like "Path is a file not a directory" would be clearer.