@@ -724,7 +724,7 @@ func (c *Client) SearchDir(ctx context.Context, auth eosclient.Authorization, se
724724 log := appctx .GetLogger (ctx )
725725 log .Debug ().Msgf ("eosbinary search with args: %s" , args )
726726 // Safeguard #2 to prevent the search to go to undesired places:
727- if ! strings .HasPrefix (path , "/eos/project/t/test " ) {
727+ if ! strings .HasPrefix (path , "/eos/project/a/awesomeproject " ) {
728728 log .Debug ().Msgf ("eosbinary - prefix doesn't match" )
729729 return nil , errors .Errorf ("eosclient: search path out of bounds fn=%s" , path )
730730 }
@@ -735,18 +735,18 @@ func (c *Client) SearchDir(ctx context.Context, auth eosclient.Authorization, se
735735 return nil , errors .Errorf ("eosclient: ilegal search string: %s" , searchString )
736736 }
737737 // TODO: set a timeout for the find in case it goes out of hand
738- stdout , _ , err := c .executeEOS (ctx , args , auth )
738+ stdout , stderr , err := c .executeEOS (ctx , args , auth )
739739 if err != nil {
740740 switch err .(type ) {
741- case errtypes.NotFound , errtypes.PermissionDenied :
741+ case errtypes.IsNotFound , errtypes.IsPermissionDenied :
742742 log .Debug ().Msgf ("eosbinary - user had insufficient permissions to search part of the directory" )
743743 default :
744- log .Error ().Msgf ("ERRROR LISTING= %s" , stdout )
745- // There will be errors:
746- //return nil, errors.Wrapf(err, "eosclient: error listing fn=%s", path)
744+ // There will be errors; we cannot ignore them:
745+ return nil , errors .Wrapf (err , "eosclient: error listing fn=%s" , path )
747746 }
748747 }
749748 log .Debug ().Msgf ("eos find stdout= %s" , stdout )
749+ log .Debug ().Msgf ("=========== eos find stderr =========== %s" , stderr )
750750 return c .parseFind (ctx , auth , path , stdout )
751751}
752752
0 commit comments