-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Scrapers dir can't be a symlink #706
Labels
Comments
as a workaround I believe you can directly set the scrapers path on scrapers_path: /home/user/code/CommunityScrapers/scrapers/ |
For the loadscrapers function filepath.Walk is used which doesnt follow symlinks by design ( to make sure no loop is created ) diff --git a/pkg/scraper/scrapers.go b/pkg/scraper/scrapers.go
index 864c09a..1aa94c5 100644
--- a/pkg/scraper/scrapers.go
+++ b/pkg/scraper/scrapers.go
@@ -9,6 +9,8 @@ import (
"github.com/stashapp/stash/pkg/logger"
"github.com/stashapp/stash/pkg/models"
+
+ "github.com/facebookgo/symwalk"
)
// GlobalConfig contains the global scraper options.
@@ -58,7 +60,7 @@ func loadScrapers(path string) ([]config, error) {
logger.Debugf("Reading scraper configs from %s", path)
scraperFiles := []string{}
- err := filepath.Walk(path, func(fp string, f os.FileInfo, err error) error {
+ err := symwalk.Walk(path, func(fp string, f os.FileInfo, err error) error {
if filepath.Ext(fp) == ".yml" {
scraperFiles = append(scraperFiles, fp)
} and a |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
stash is unable to load scrapers if the
scrapers
dir is a symlink. There is no error in the log. Scrapers just don't load.ls .stash/scrapers
returns correclty the target scrapers dir content, so the symlink works.It would be great for this to work, so i.e. the
scrapers
folder from theCommunityScrapers
git repo could be symlinked and used with version control.To Reproduce
Steps to reproduce the behavior:
~/.stash/scrapers
with a symlinkExpected behavior
stash should find the scrapers.
Stash Version: (from Settings -> About):
git master b465c36
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: