zola icon indicating copy to clipboard operation
zola copied to clipboard

`Got a change in an unexpected path` when the changed file's real path is outside the site directory

Open yvt opened this issue 2 years ago • 4 comments

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.

yvt avatar Sep 28 '21 04:09 yvt

Hmm it's not meant to be supported but it should be an error, not an unreachable

Keats avatar Sep 28 '21 07:09 Keats

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.

jmerdich avatar Sep 29 '21 02:09 jmerdich

The config one is a bug that is fixed in the next branch.

Keats avatar Sep 30 '21 17:09 Keats

@Keats Won't symlinking content files be supported?

harish-coeff avatar Dec 28 '23 05:12 harish-coeff