mirror of
https://github.com/rclone/rclone.git
synced 2025-01-20 13:18:41 +01:00
mega: skip undecodable FSNodes - #3740 - FIXME vendor patch DO NOT MERGE
Also test whether we have a decryption key for shared nodes
This commit is contained in:
parent
e14d968f8d
commit
c48424c0eb
8
vendor/github.com/t3rm1n4l/go-mega/mega.go
generated
vendored
8
vendor/github.com/t3rm1n4l/go-mega/mega.go
generated
vendored
@ -750,7 +750,10 @@ func (m *Mega) addFSNode(itm FSNode) (*Node, error) {
|
||||
}
|
||||
// Shared file
|
||||
default:
|
||||
k := m.FS.skmap[args[0]]
|
||||
k, ok := m.FS.skmap[args[0]]
|
||||
if !ok {
|
||||
return nil, errors.New("couldn't find decryption key for shared file")
|
||||
}
|
||||
b, err := base64urldecode(k)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -921,7 +924,8 @@ func (m *Mega) getFileSystem() error {
|
||||
for _, itm := range res[0].F {
|
||||
_, err = m.addFSNode(itm)
|
||||
if err != nil {
|
||||
return err
|
||||
m.debugf("couldn't decode FSNode %#v: %v ", itm, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user