Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(serve): content can be served from output_path
This fixes a bug introduced in #2258 The issue arose when `output_path` was relative. The request being served would be canonicalized and this would be a string. So, for example, if you were serving content from `public` the code [right after](https://github.com/getzola/zola/blob/38199c125501e9ff0e700e96adaca72cc3f25d2b/src/cmd/serve.rs#L144-L147) the canonicalization checking if `root.starts_with(original_root)` would always return `false` since an absolute path, `/some/path/to/content` would never start with a string like `public`.
- Loading branch information