Manager: use absolute storage path
This helps to get things consistent on Windows and Linux. Otherwise a path like `/some/path` is absolute on one platform but not on the other. This is mostly for getting the unit tests in this package to work on Windows, but using absolute paths also helps in clarity of error logging.
This commit is contained in:
parent
7f5978a0f2
commit
7a19e2f38d
@ -245,6 +245,15 @@ func (c *Conf) processAfterLoading(override ...func(c *Conf)) {
|
||||
}
|
||||
|
||||
func (c *Conf) processStorage() {
|
||||
storagePath, err := filepath.Abs(c.StoragePath)
|
||||
if err != nil {
|
||||
log.Error().Err(err).
|
||||
Str("storage_path", c.StoragePath).
|
||||
Msg("unable to determine absolute storage path")
|
||||
} else {
|
||||
c.StoragePath = storagePath
|
||||
}
|
||||
|
||||
// Shaman should use the Flamenco storage location.
|
||||
if c.Shaman.Enabled {
|
||||
c.Shaman.StoragePath = c.StoragePath
|
||||
|
Loading…
x
Reference in New Issue
Block a user