Use symwalk for scrapers (#938)

This commit is contained in:
bnkai
2020-11-16 00:21:26 +02:00
committed by GitHub
parent 0a098b1d63
commit e62e74bff4

View File

@@ -9,6 +9,7 @@ import (
"github.com/stashapp/stash/pkg/logger" "github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/models" "github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/utils"
) )
// GlobalConfig contains the global scraper options. // GlobalConfig contains the global scraper options.
@@ -58,7 +59,7 @@ func loadScrapers(path string) ([]config, error) {
logger.Debugf("Reading scraper configs from %s", path) logger.Debugf("Reading scraper configs from %s", path)
scraperFiles := []string{} scraperFiles := []string{}
err := filepath.Walk(path, func(fp string, f os.FileInfo, err error) error { err := utils.SymWalk(path, func(fp string, f os.FileInfo, err error) error {
if filepath.Ext(fp) == ".yml" { if filepath.Ext(fp) == ".yml" {
scraperFiles = append(scraperFiles, fp) scraperFiles = append(scraperFiles, fp)
} }