From e5b7e089fc54f835005067a6c5dd098fb7f31a1a Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Fri, 10 Jan 2025 16:16:10 +0000 Subject: [PATCH] etcdutl/etcdutl: use datadir package to build wal/snapdir It's follow-up for https://github.com/etcd-io/etcd/pull/19113#discussion_r1910213211 Signed-off-by: Wei Fu --- etcdutl/etcdutl/check_command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etcdutl/etcdutl/check_command.go b/etcdutl/etcdutl/check_command.go index d596dc9f9a6..2ea6fb29ae2 100644 --- a/etcdutl/etcdutl/check_command.go +++ b/etcdutl/etcdutl/check_command.go @@ -17,11 +17,11 @@ package etcdutl import ( "errors" "fmt" - "path/filepath" "github.com/spf13/cobra" "go.etcd.io/etcd/pkg/v3/cobrautl" + "go.etcd.io/etcd/server/v3/datadir" "go.etcd.io/etcd/server/v3/etcdserver" "go.etcd.io/etcd/server/v3/etcdserver/api/membership" "go.etcd.io/etcd/server/v3/etcdserver/api/snap" @@ -67,8 +67,8 @@ func checkV2StoreDataDir(dataDir string) error { var ( lg = GetLogger() - walDir = filepath.Join(dataDir, "member", "wal") - snapDir = filepath.Join(dataDir, "member", "snap") + walDir = datadir.ToWalDir(dataDir) + snapDir = datadir.ToSnapDir(dataDir) ) walSnaps, err := wal.ValidSnapshotEntries(lg, walDir)