Skip to content

Commit

Permalink
Fix EOS attr deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Jul 5, 2021
1 parent a8d9d26 commit 37656bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/eosclient/eosbinary/eosbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func (c *Client) GetAttr(ctx context.Context, uid, gid, key, path string) (*eosc

func deserializeAttribute(attrStr string) (*eosclient.Attribute, error) {
// the string is in the form sys.forced.checksum="adler"
keyValue := strings.Split(attrStr, "=") // keyValue = ["sys.forced.checksum", "\"adler\""]
keyValue := strings.Split(strings.TrimSpace(attrStr), "=") // keyValue = ["sys.forced.checksum", "\"adler\""]
if len(keyValue) != 2 {
return nil, errtypes.InternalError("wrong attr format to deserialize")
}
Expand Down

0 comments on commit 37656bf

Please sign in to comment.