Manager: allow absolute manager-local storage path
When an absolute path is used for the manager-local storage, use it as-is. Before this, it would always be taken as relative to the manager executable.
This commit is contained in:
parent
041453f401
commit
dbf23f1a41
@ -20,7 +20,14 @@ type StorageInfo struct {
|
||||
// NewNextToExe returns a storage representation that sits next to the
|
||||
// currently-running executable. If that directory cannot be determined, falls
|
||||
// back to the current working directory.
|
||||
// If `subdir` is an absolute path, it is used as-is.
|
||||
func NewNextToExe(subdir string) StorageInfo {
|
||||
if filepath.IsAbs(subdir) {
|
||||
return StorageInfo{
|
||||
rootPath: subdir,
|
||||
}
|
||||
}
|
||||
|
||||
exeDir := getSuitableStorageRoot()
|
||||
storagePath := filepath.Join(exeDir, subdir)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user