hugolib: Fix live-reload regression for add/removal of dirs

This reverts commit b5b6e81c02.

That change breaks watching of new directories (new dirs, deleted dirs).

Reopens #3325
Fixes #3569
This commit is contained in:
Bjørn Erik Pedersen
2017-06-07 22:11:15 +02:00
parent 5be0448635
commit 49a104309d
2 changed files with 2 additions and 14 deletions

View File

@@ -90,7 +90,7 @@ func (f *Filesystem) captureFiles() {
return nil
}
b, err := f.ShouldRead(filePath, fi)
b, err := f.shouldRead(filePath, fi)
if err != nil {
return err
}
@@ -118,7 +118,7 @@ func (f *Filesystem) captureFiles() {
}
func (f *Filesystem) ShouldRead(filePath string, fi os.FileInfo) (bool, error) {
func (f *Filesystem) shouldRead(filePath string, fi os.FileInfo) (bool, error) {
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
link, err := filepath.EvalSymlinks(filePath)
if err != nil {