From 9ebd1179541df421b2da38a1b1a30a963b97a3b0 Mon Sep 17 00:00:00 2001 From: Hugo Gonzalez Date: Tue, 7 Jan 2025 10:20:53 +0100 Subject: [PATCH] handle empty traces --- pkg/eosclient/eosbinary/eosbinary.go | 5 ++++- pkg/storage/fs/cephfs/errors.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/eosclient/eosbinary/eosbinary.go b/pkg/eosclient/eosbinary/eosbinary.go index 1541735246..cd38d26d45 100644 --- a/pkg/eosclient/eosbinary/eosbinary.go +++ b/pkg/eosclient/eosbinary/eosbinary.go @@ -247,7 +247,10 @@ func (c *Client) executeEOS(ctx context.Context, cmdArgs []string, auth eosclien cmd.Args = append(cmd.Args, cmdArgs...) - cmd.Args = append(cmd.Args, "--comment", trace.Get(ctx)) + t := trace.Get(ctx) + if t != "" { + cmd.Args = append(cmd.Args, "--comment", t) + } err := cmd.Run() diff --git a/pkg/storage/fs/cephfs/errors.go b/pkg/storage/fs/cephfs/errors.go index 8182635bea..abc8079941 100644 --- a/pkg/storage/fs/cephfs/errors.go +++ b/pkg/storage/fs/cephfs/errors.go @@ -28,8 +28,8 @@ package cephfs */ import "C" import ( - "fmt" "context" + "fmt" "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/errtypes" )