remove dirs from snapshot listing

Signed-off-by: Brian Downs <brian.downs@gmail.com>
This commit is contained in:
Brian Downs
2021-04-29 16:47:49 -07:00
parent 2ca14a331e
commit 86ecb79716

View File

@@ -910,6 +910,9 @@ func (e *ETCD) listSnapshots(ctx context.Context, snapshotDir string) ([]snapsho
if obj.Err != nil {
return nil, obj.Err
}
if obj.Size == 0 {
continue
}
ca, err := time.Parse(time.RFC3339, obj.LastModified.Format(time.RFC3339))
if err != nil {
return nil, err