cmd/tailscale: resolve taildrive share paths

Fixes #12258.

Signed-off-by: Linus Brogan <git@linusbrogan.com>
pull/12799/head
Linus Brogan 6 months ago committed by Percy Wegmann
parent 7403d8e9a8
commit 9609b26541

@ -6,6 +6,7 @@ package cli
import ( import (
"context" "context"
"fmt" "fmt"
"path/filepath"
"strings" "strings"
"github.com/peterbourgon/ff/v3/ffcli" "github.com/peterbourgon/ff/v3/ffcli"
@ -66,9 +67,14 @@ func runDriveShare(ctx context.Context, args []string) error {
name, path := args[0], args[1] name, path := args[0], args[1]
err := localClient.DriveShareSet(ctx, &drive.Share{ absolutePath, err := filepath.Abs(path)
if err != nil {
return err
}
err = localClient.DriveShareSet(ctx, &drive.Share{
Name: name, Name: name,
Path: path, Path: absolutePath,
}) })
if err == nil { if err == nil {
fmt.Printf("Sharing %q as %q\n", path, name) fmt.Printf("Sharing %q as %q\n", path, name)

Loading…
Cancel
Save