go pageConverter(pageChan, convertResults, wg2)
}
- sp := source.NewSourceSpec(s.Cfg, s.Fs)
- fs := sp.NewFilesystem("")
-
for _, ev := range sourceChanged {
// The incrementalReadCollator below will also make changes to the site's pages,
// so we do this first to prevent races.
}
}
- // ignore files shouldn't be proceed
- if fi, err := s.Fs.Source.Stat(ev.Name); err != nil {
- continue
- } else {
- if ok, err := fs.ShouldRead(ev.Name, fi); err != nil || !ok {
- continue
- }
- }
-
sourceReallyChanged = append(sourceReallyChanged, ev)
}
return nil
}
- b, err := f.ShouldRead(filePath, fi)
+ b, err := f.shouldRead(filePath, fi)
if err != nil {
return err
}
}
-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 {