Skip to content

Commit

Permalink
fix(alist_v3): missed meta_password update
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Apr 24, 2023
1 parent 49f13b9 commit 36cd504
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/alist_v3/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (d *AListV3) List(ctx context.Context, dir model.Obj, args model.ListArgs)
PerPage: 0,
},
Path: dir.GetPath(),
Password: d.Password,
Password: d.MetaPassword,
Refresh: false,
})
})
Expand Down Expand Up @@ -79,7 +79,7 @@ func (d *AListV3) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
_, err := d.request("/fs/get", http.MethodPost, func(req *resty.Request) {
req.SetResult(&resp).SetBody(FsGetReq{
Path: file.GetPath(),
Password: d.Password,
Password: d.MetaPassword,
})
})
if err != nil {
Expand Down Expand Up @@ -144,7 +144,7 @@ func (d *AListV3) Remove(ctx context.Context, obj model.Obj) error {
func (d *AListV3) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error {
_, err := d.request("/fs/put", http.MethodPut, func(req *resty.Request) {
req.SetHeader("File-Path", path.Join(dstDir.GetPath(), stream.GetName())).
SetHeader("Password", d.Password).
SetHeader("Password", d.MetaPassword).
SetHeader("Content-Length", strconv.FormatInt(stream.GetSize(), 10)).
SetBody(stream.GetReadCloser())
})
Expand Down

0 comments on commit 36cd504

Please sign in to comment.