feat(cloudreve): auto remove trailing slash in address (#4492)

Co-authored-by: Andy Hsu <i@nn.ci>
pull/4451/head^2
KAAAsS 2023-05-28 16:18:09 +08:00 committed by GitHub
parent 4369cbbac3
commit a80e21997c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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()
}