forked from TrueCloudLab/rclone
mega: fix unmarshal error on download - FIXME need to upstream this fix
Failed to copy: failed to open source object: open download file failed: json: cannot unmarshal number -18 into Go struct field DownloadResp.e of type uint32 See: https://forum.rclone.org/t/failed-message-what-does-it-mean/9065
This commit is contained in:
parent
415eeca6cf
commit
6811629877
2 changed files with 9 additions and 4 deletions
5
vendor/github.com/t3rm1n4l/go-mega/mega.go
generated
vendored
5
vendor/github.com/t3rm1n4l/go-mega/mega.go
generated
vendored
|
@ -894,6 +894,11 @@ func (m *Mega) NewDownload(src *Node) (*Download, error) {
|
||||||
return nil, err
|
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))
|
_, err = decryptAttr(key, []byte(res[0].Attr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
2
vendor/github.com/t3rm1n4l/go-mega/messages.go
generated
vendored
2
vendor/github.com/t3rm1n4l/go-mega/messages.go
generated
vendored
|
@ -123,7 +123,7 @@ type DownloadResp struct {
|
||||||
G string `json:"g"`
|
G string `json:"g"`
|
||||||
Size uint64 `json:"s"`
|
Size uint64 `json:"s"`
|
||||||
Attr string `json:"at"`
|
Attr string `json:"at"`
|
||||||
Err uint32 `json:"e"`
|
Err ErrorMsg `json:"e"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UploadMsg struct {
|
type UploadMsg struct {
|
||||||
|
|
Loading…
Add table
Reference in a new issue