1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00
Bjørn Erik Pedersen 364e69ab7f 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
2016-09-11 20:00:38 +02:00
..
2016-09-06 18:32:20 +03:00
2016-06-25 17:57:05 -05:00
2016-09-06 18:32:18 +03:00
2016-09-06 18:32:16 +03:00
2016-09-08 16:51:32 +03:00
2016-09-11 10:46:56 +02:00
2016-09-06 18:32:15 +03:00
2016-09-06 18:32:18 +03:00
2016-09-06 18:32:18 +03:00
2016-09-08 21:23:01 +02:00
2016-09-08 21:23:01 +02:00
2016-09-11 20:00:38 +02:00