Skip to content

Commit

Permalink
style: osutil: update MustUserHomeDir()
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Mar 25, 2022
1 parent 32387b5 commit 18c2786
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions os/osutil/filepath.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ func MustUserHomeDir(subdirs ...string) string {
panic(err)
}
if len(subdirs) > 0 {
subdirs = append([]string{userhomedir}, subdirs...)
return filepath.Join(subdirs...)
return filepath.Join(userhomedir, filepath.Join(subdirs...))
}
return userhomedir
}
Expand Down

0 comments on commit 18c2786

Please sign in to comment.