mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Exclude media in generated directory (#1118)
This commit is contained in:
@@ -1044,6 +1044,8 @@ func walkFilesToScan(s *models.StashConfig, f filepath.WalkFunc) error {
|
||||
excludeVidRegex := generateRegexps(config.GetExcludes())
|
||||
excludeImgRegex := generateRegexps(config.GetImageExcludes())
|
||||
|
||||
generatedPath := config.GetGeneratedPath()
|
||||
|
||||
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())
|
||||
@@ -1051,6 +1053,11 @@ func walkFilesToScan(s *models.StashConfig, f filepath.WalkFunc) error {
|
||||
}
|
||||
|
||||
if info.IsDir() {
|
||||
// #1102 - ignore files in generated path
|
||||
if utils.IsPathInDir(generatedPath, path) {
|
||||
return filepath.SkipDir
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user