mirror of https://github.com/Xhofe/alist
feat(cloudreve): auto remove trailing slash in address (#4492)
Co-authored-by: Andy Hsu <i@nn.ci>pull/4451/head^2
parent
4369cbbac3
commit
a80e21997c
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue