From ecbbc23c60d0126839adc017093c1fdb14b705dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczy=C5=84ski?= <2000michal@wp.pl> Date: Mon, 19 Aug 2024 09:43:06 +0200 Subject: [PATCH] fix(scyllaclient): don't return payload on error Fixes #3972 --- pkg/scyllaclient/client_rclone.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/scyllaclient/client_rclone.go b/pkg/scyllaclient/client_rclone.go index e09068ae1..4db3e2782 100644 --- a/pkg/scyllaclient/client_rclone.go +++ b/pkg/scyllaclient/client_rclone.go @@ -381,7 +381,10 @@ func (c *Client) RcloneDeletePaths(ctx context.Context, host, remoteDir string, }, } res, err := c.agentOps.OperationsDeletepaths(&p) - return res.Payload.Deletes, err + if err != nil { + return 0, err + } + return res.Payload.Deletes, nil } // RcloneDiskUsage get disk space usage.