homedir_dynamic.go 171 字节
Newer Older
S
stormgbs 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// +build !static_build

package dbus

import (
	"os/user"
)

func lookupHomeDir() string {
	u, err := user.Current()
	if err != nil {
		return "/"
	}
	return u.HomeDir
}