Skip to content

Commit

Permalink
fix(115): data race in Link (#5253)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovear authored Sep 21, 2023
1 parent f0981a0 commit 2a6ab77
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/115/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ func (d *Pan115) List(ctx context.Context, dir model.Obj, args model.ListArgs) (

func (d *Pan115) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) {
downloadInfo, err := d.client.
SetUserAgent(driver115.UA115Browser).
Download(file.(*FileObj).PickCode)
// recover for upload
d.client.SetUserAgent(driver115.UA115Desktop)
DownloadWithUA(file.(*FileObj).PickCode, driver115.UA115Browser)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 2a6ab77

Please sign in to comment.