From 9fbf08957aa34e46331ab71640cffbf500b4e76b Mon Sep 17 00:00:00 2001 From: Jesse Geens Date: Thu, 19 Sep 2024 12:03:33 +0200 Subject: [PATCH] fix bug where arg was wrongly appended --- pkg/eosclient/eosbinary/eosbinary.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/eosclient/eosbinary/eosbinary.go b/pkg/eosclient/eosbinary/eosbinary.go index 77615b830b..139b40048b 100644 --- a/pkg/eosclient/eosbinary/eosbinary.go +++ b/pkg/eosclient/eosbinary/eosbinary.go @@ -747,10 +747,12 @@ func (c *Client) writeFile(ctx context.Context, auth eosclient.Authorization, pa if auth.Token != "" { args[4] += "?authz=" + auth.Token } else if auth.Role.UID != "" && auth.Role.GID != "" { - args = append(args, fmt.Sprintf("-ODeos.ruid=%s&eos.rgid=%s&eos.app=%s", auth.Role.UID, auth.Role.GID, app)) + queryParams := fmt.Sprintf("-ODeos.ruid=%s&eos.rgid=%s&eos.app=%s", auth.Role.UID, auth.Role.GID, app) + if disableVersioning { - args = append(args, "&eos.versioning=0") + queryParams += "&eos.versioning=0" } + args = append(args, queryParams) } _, _, err := c.executeXRDCopy(ctx, args)