From 558cf0dab4ad962ae07b962c6af94ecf9742b4e7 Mon Sep 17 00:00:00 2001 From: Rene Zbinden Date: Thu, 27 May 2021 19:14:39 +0200 Subject: [PATCH] fix: version detection when engine gets converted --- kv.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kv.go b/kv.go index fee3bf3..8808e9e 100644 --- a/kv.go +++ b/kv.go @@ -155,7 +155,12 @@ func getVersionAndMount(c *api.Client, p string) (version int, mount string, err return version, k, nil case "generic": - return 1, k, nil + version, err := strconv.Atoi(m.Options["version"]) + if err != nil { + return 0, "", err + } + + return version, k, nil default: return 0, "", fmt.Errorf("matching mount %s for path %s is not of type kv", k, p) }