diff --git a/drivers/cloudreve/driver.go b/drivers/cloudreve/driver.go index b0cc248e..22407d0c 100644 --- a/drivers/cloudreve/driver.go +++ b/drivers/cloudreve/driver.go @@ -5,6 +5,7 @@ import ( "io" "net/http" "strconv" + "strings" "github.com/alist-org/alist/v3/drivers/base" "github.com/alist-org/alist/v3/internal/driver" @@ -30,6 +31,8 @@ func (d *Cloudreve) Init(ctx context.Context) error { if d.Cookie != "" { return nil } + // removing trailing slash + d.Address = strings.TrimSuffix(d.Address, "/") return d.login() } diff --git a/drivers/cloudreve/util.go b/drivers/cloudreve/util.go index f4a37280..6a13ac7a 100644 --- a/drivers/cloudreve/util.go +++ b/drivers/cloudreve/util.go @@ -57,7 +57,7 @@ func (d *Cloudreve) request(method string, path string, callback base.ReqCallbac return d.request(method, path, callback, out) } } - + return errors.New(r.Msg) } sess := cookie.GetCookie(resp.Cookies(), "cloudreve-session")