homedir_dynamic.go 171 B

12345678910111213141516
  1. // +build !static_build
  2. package dbus
  3. import (
  4. "os/user"
  5. )
  6. func lookupHomeDir() string {
  7. u, err := user.Current()
  8. if err != nil {
  9. return "/"
  10. }
  11. return u.HomeDir
  12. }