Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

mega: fix crash when logging in with previous auth keys fails

Andrew Gunnersonc744949d9192
diff --git a/backend/mega/mega.go b/backend/mega/mega.go
index 4eda36a44..b0ef2e10b 100644
--- a/backend/mega/mega.go
+++ b/backend/mega/mega.go
@@ -284,7 +284,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}
err = srv.LoginWithKeys(opt.SessionID, decodedMasterKey)
if err != nil {
- fs.Debugf(f, "login with previous auth keys failed: %v", err)
+ return nil, fmt.Errorf("login with previous auth keys failed: %w", err)
}
}
}