mirror of
https://github.com/stashapp/stash.git
synced 2025-12-20 15:24:05 +01:00
Fix clean and scan bugs (#846)
This commit is contained in:
parent
12cba97192
commit
482f8cbd92
2 changed files with 7 additions and 1 deletions
|
|
@ -45,10 +45,11 @@ func CalculateMD5(path string) (string, error) {
|
|||
}
|
||||
|
||||
func FileExists(path string) bool {
|
||||
_, err := openSourceImage(path)
|
||||
f, err := openSourceImage(path)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,6 +656,11 @@ func walkFilesToScan(s *models.StashConfig, f filepath.WalkFunc) error {
|
|||
excludeImg := config.GetImageExcludes()
|
||||
|
||||
return symwalk.Walk(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
|
||||
}
|
||||
|
||||
if info.IsDir() {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue