diff --git a/cmd/tailscale/cli/push.go b/cmd/tailscale/cli/push.go index d1e095e9e..721ca2e6d 100644 --- a/cmd/tailscale/cli/push.go +++ b/cmd/tailscale/cli/push.go @@ -16,6 +16,7 @@ import ( "net/http" "net/url" "os" + "path/filepath" "strconv" "time" "unicode/utf8" @@ -98,7 +99,7 @@ func runPush(ctx context.Context, args []string) error { contentLength = fi.Size() fileContents = io.LimitReader(f, contentLength) if name == "" { - name = fileArg + name = filepath.Base(fileArg) } if slow, _ := strconv.ParseBool(os.Getenv("TS_DEBUG_SLOW_PUSH")); slow {