zola
zola copied to clipboard
`Got a change in an unexpected path` when the changed file's real path is outside the site directory
Bug Report
Environment
Zola version: 0.14.0, obtained via nixpkgs
Expected Behavior
cd /private/tmp/zola-test
mkdir zola
cd zola
zola init
rmdir content
ln -s .. content
zola serve &
touch content/index.md
The website should be rebuilt in response to a change in content/index.md
.
Current Behavior
Change detected @ 2021-09-28 13:07:08
thread 'main' panicked at 'internal error: entered unreachable code: Got a change in an unexpected path: /private/tmp/zola-test/index.md', src/cmd/serve.rs:666:9
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Step to reproduce
See Expected Behavior.
Hmm it's not meant to be supported but it should be an error, not an unreachable
Having symlinks doesn't seem too odd, but FWIW, I'm also seeing this error when modifying config.toml (... "unexpected path: "/config.toml""). This is on Windows v0.14.1 installed from Scoop, and the config file is a normal file in the site root, not a symlink.
IMO, the least surprising thing to do is that if you aren't sure, regen everything.
The config one is a bug that is fixed in the next
branch.
@Keats Won't symlinking content files be supported?