From 62bbef7253ceca7fac3a298fcdf36c32b71a040c Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Thu, 29 Apr 2021 11:52:11 -0700 Subject: [PATCH] update struct field doc comment and get basename on s3 obj Signed-off-by: Brian Downs --- pkg/etcd/etcd.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/etcd/etcd.go b/pkg/etcd/etcd.go index cd0b020a70..30312154d7 100644 --- a/pkg/etcd/etcd.go +++ b/pkg/etcd/etcd.go @@ -884,8 +884,7 @@ type s3Config struct { type snapshotFile struct { Name string `json:"name"` // Location contains the full path of the snapshot. For - // local paths, the location will be prefixed with "file://" - // and for S3 will be "s3://". + // local paths, the location will be prefixed with "file://". Location string `json:"location,omitempty"` NodeName string `json:"nodeName,omitempty"` CreatedAt *metav1.Time `json:"createdAt,omitempty"` @@ -918,7 +917,7 @@ func (e *ETCD) listSnapshots(ctx context.Context, snapshotDir string) ([]snapsho return nil, err } snapshots = append(snapshots, snapshotFile{ - Name: obj.Key, + Name: filepath.Base(obj.Key), NodeName: nodeName, CreatedAt: &metav1.Time{ Time: ca,