From 36cd504783962818180a648df6fe9cea57c203d9 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Mon, 24 Apr 2023 20:56:46 +0800 Subject: [PATCH] fix(alist_v3): missed meta_password update fix: https://github.com/alist-org/alist/commit/adb0739dfed02a6c421bb0209e6856e73330bd6c#commitcomment-110328033 --- drivers/alist_v3/driver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/alist_v3/driver.go b/drivers/alist_v3/driver.go index 9bc4c14c..ab1e03c8 100644 --- a/drivers/alist_v3/driver.go +++ b/drivers/alist_v3/driver.go @@ -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, }) }) @@ -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 { @@ -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()) })