Fix json filename generation (#2887)

This commit is contained in:
WithoutPants
2022-09-06 13:10:24 +10:00
parent 0c513a604d
commit 13bdba5b24
9 changed files with 63 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import (
"os"
jsoniter "github.com/json-iterator/go"
"github.com/stashapp/stash/pkg/fsutil"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/models/json"
)
@@ -24,7 +25,7 @@ type Studio struct {
}
func (s Studio) Filename() string {
return s.Name + ".json"
return fsutil.SanitiseBasename(s.Name) + ".json"
}
func LoadStudioFile(filePath string) (*Studio, error) {