diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-10 19:37:27 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-09-11 20:00:38 +0200 |
commit | 364e69ab7f54ab7a9901644647125f21cd39e98c (patch) | |
tree | dcc48331b2a7d14c885696bfc5b844a206be0bad /source/filesystem.go | |
parent | e70cf1ace45498366d029e699af39441fab6bd0f (diff) | |
download | hugo-364e69ab7f54ab7a9901644647125f21cd39e98c.tar.gz hugo-364e69ab7f54ab7a9901644647125f21cd39e98c.zip |
Handle symlink change event
Hugo 0.16 announced support for symbolic links for the root folders, /content, /static etc., but this got broken pretty fast.
The main problem this commit tries to solve is the matching of file change events to "what changed".
An example:
ContentDir: /mysites/site/content where /mysites/site/content is a symlink to /mycontent
/mycontent:
/mypost1.md
/post/mypost2.md
* A change to mypost1.md (on OS X) will trigger a file change event with name "/mycontent/mypost1.md"
* A change to mypost2.md gives event with name "/mysites/site/content/mypost2.md"
The first change will not trigger a correct update of Hugo before this commit. This commit fixes this by doing a two-step check:
1. Check if "/mysites/site/content/mypost2.md" is within /mysites/site/content
2. Check if "/mysites/site/content/mypost2.md" is within the real path that /mysites/site/content points to
Fixes #2265
Closes #2273
Diffstat (limited to 'source/filesystem.go')
0 files changed, 0 insertions, 0 deletions