mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Don't convert config file location to absolute during setup (#6373)
This was originally done for #3304. The ffmpeg code has been redone since and this is no longer necessary. It was also resulting in the scraper and plugin paths being absolute, despite all the others being relative to the provided config path.
This commit is contained in:
parent
39fd8a6550
commit
d994df2900
1 changed files with 5 additions and 2 deletions
|
|
@ -219,8 +219,11 @@ func (s *Manager) Setup(ctx context.Context, input SetupInput) error {
|
||||||
// paths since they must not be relative. The config file property is
|
// paths since they must not be relative. The config file property is
|
||||||
// resolved to an absolute path when stash is run normally, so convert
|
// resolved to an absolute path when stash is run normally, so convert
|
||||||
// relative paths to absolute paths during setup.
|
// relative paths to absolute paths during setup.
|
||||||
configFile, _ := filepath.Abs(input.ConfigLocation)
|
// #6287 - this should no longer be necessary since the ffmpeg code
|
||||||
|
// converts to absolute paths. Converting the config location to
|
||||||
|
// absolute means that scraper and plugin paths default to absolute
|
||||||
|
// which we don't want.
|
||||||
|
configFile := input.ConfigLocation
|
||||||
configDir := filepath.Dir(configFile)
|
configDir := filepath.Dir(configFile)
|
||||||
|
|
||||||
if exists, _ := fsutil.DirExists(configDir); !exists {
|
if exists, _ := fsutil.DirExists(configDir); !exists {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue