Skip to content

Commit

Permalink
fix: store profiles in subdirectory of root persistence path
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyzimmer committed Nov 9, 2023
1 parent fde205f commit 59976b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cmd/daemoncmd/connmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ func NewConnManager(conf Config) (*ConnManager, error) {
if err != nil {
return nil, fmt.Errorf("load key: %w", err)
}
profiles, err := NewProfileStore(conf.Persistence.Path)
profiles, err := NewProfileStore(func() string {
if conf.Persistence.Path == "" {
return ""
}
return filepath.Join(conf.Persistence.Path, "profiles")
}())
if err != nil {
return nil, fmt.Errorf("create profile store: %w", err)
}
Expand Down

0 comments on commit 59976b2

Please sign in to comment.