Open
Description
What kind of documentation problem are you reporting?
Unclear Docs
Where is the issue found?
https://api.rocket.rs/v0.5/rocket/fs/struct.FileServer#relative-paths
What's wrong?
I encountered an issue serving a static HTML template after deploying it with Docker containerization and I think that the documentation is a bit unclear.
Let me quote it first
In the example above, /static is an absolute path. If your static files are stored relative to your crate and your project is managed by Rocket, use the relative! macro to obtain a path that is relative to your crate’s root.
Actually relative!("static")
seems to produce an absolute path out of the relative one, so finally I had to omit the relative!
even though it was counter-intuitive.
System Checks
- I confirmed that the issue still exists on
master
on GitHub. - I was unable to find a previous report of this problem.