Pass directory name to filters in LstatIfPossible in the same way as Readdir
authorEvan Anderson <evana@vmware.com>
Thu, 19 Mar 2020 17:51:17 +0000 (10:51 -0700)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 19 Mar 2020 19:09:34 +0000 (20:09 +0100)
hugofs/filter_fs.go

index ca9c333614f9b5c3402008ce525232097bae3af3..15373c2e552201294a3e19f2194dca8719faaaa8 100644 (file)
@@ -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