From cc2a5d52a4ad188d93aeb2d51d5c19c7661e098d Mon Sep 17 00:00:00 2001 From: Evan Anderson Date: Thu, 19 Mar 2020 10:51:17 -0700 Subject: [PATCH] Pass directory name to filters in LstatIfPossible in the same way as Readdir --- hugofs/filter_fs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hugofs/filter_fs.go b/hugofs/filter_fs.go index ca9c33361..15373c2e5 100644 --- a/hugofs/filter_fs.go +++ b/hugofs/filter_fs.go @@ -153,7 +153,8 @@ func (fs *FilterFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { return decorateFileInfo(fi, fs, fs.getOpener(name), "", "", nil), false, nil } - fs.applyFilters(name, -1, fi) + parent := filepath.Dir(name) + fs.applyFilters(parent, -1, fi) return fi, b, nil