diff --git a/vendor/github.com/t3rm1n4l/go-mega/mega.go b/vendor/github.com/t3rm1n4l/go-mega/mega.go index 5163bdbe9..d3f919a08 100644 --- a/vendor/github.com/t3rm1n4l/go-mega/mega.go +++ b/vendor/github.com/t3rm1n4l/go-mega/mega.go @@ -894,6 +894,11 @@ func (m *Mega) NewDownload(src *Node) (*Download, error) { return nil, err } + // DownloadResp has an embedded error in it for some reason + if res[0].Err != 0 { + return nil, parseError(res[0].Err) + } + _, err = decryptAttr(key, []byte(res[0].Attr)) if err != nil { return nil, err diff --git a/vendor/github.com/t3rm1n4l/go-mega/messages.go b/vendor/github.com/t3rm1n4l/go-mega/messages.go index 3677fcd04..8b60c1af9 100644 --- a/vendor/github.com/t3rm1n4l/go-mega/messages.go +++ b/vendor/github.com/t3rm1n4l/go-mega/messages.go @@ -120,10 +120,10 @@ type DownloadMsg struct { } type DownloadResp struct { - G string `json:"g"` - Size uint64 `json:"s"` - Attr string `json:"at"` - Err uint32 `json:"e"` + G string `json:"g"` + Size uint64 `json:"s"` + Attr string `json:"at"` + Err ErrorMsg `json:"e"` } type UploadMsg struct {