Fix scan issue when encountering invalid symlinks (#871)

* Implement fixed symwalk algorithm
* Remove dependency
This commit is contained in:
WithoutPants
2020-10-20 17:00:23 +11:00
committed by GitHub
parent 8eda72ad89
commit 872bb70f6e
9 changed files with 81 additions and 148 deletions

View File

@@ -11,7 +11,6 @@ import (
"sync"
"time"
"github.com/facebookgo/symwalk"
"github.com/jmoiron/sqlx"
"github.com/stashapp/stash/pkg/database"
@@ -655,7 +654,7 @@ func walkFilesToScan(s *models.StashConfig, f filepath.WalkFunc) error {
excludeVid := config.GetExcludes()
excludeImg := config.GetImageExcludes()
return symwalk.Walk(s.Path, func(path string, info os.FileInfo, err error) error {
return utils.SymWalk(s.Path, func(path string, info os.FileInfo, err error) error {
if err != nil {
logger.Warnf("error scanning %s: %s", path, err.Error())
return nil