diff --git a/cmd/files.go b/cmd/files.go index 4d09bf7..c88f4b8 100644 --- a/cmd/files.go +++ b/cmd/files.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "math/big" - "os/user" "regexp" "crypto/rand" @@ -604,15 +603,15 @@ func pickFile(args []string, filters *filters, sort string, cache *fileCache, fo } func normalizePath(path string) (string, error) { - usr, err := user.Current() + homeDir, err := os.UserHomeDir() if err != nil { return "", err } if path == "~" { - path = usr.HomeDir + path = homeDir } else if strings.HasPrefix(path, "~/") { - path = filepath.Join(usr.HomeDir, path[2:]) + path = filepath.Join(homeDir, path[2:]) } path, err = filepath.EvalSymlinks(path) diff --git a/cmd/root.go b/cmd/root.go index 650f2fa..b4c4117 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "0.78.1" + ReleaseVersion string = "0.78.2" ) var (