mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-28 08:14:03 +08:00
feat(cloudreve): auto remove trailing slash in address (#4492)
Co-authored-by: Andy Hsu <i@nn.ci>
This commit is contained in:
parent
4369cbbac3
commit
a80e21997c
@ -5,6 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/alist-org/alist/v3/drivers/base"
|
"github.com/alist-org/alist/v3/drivers/base"
|
||||||
"github.com/alist-org/alist/v3/internal/driver"
|
"github.com/alist-org/alist/v3/internal/driver"
|
||||||
@ -30,6 +31,8 @@ func (d *Cloudreve) Init(ctx context.Context) error {
|
|||||||
if d.Cookie != "" {
|
if d.Cookie != "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// removing trailing slash
|
||||||
|
d.Address = strings.TrimSuffix(d.Address, "/")
|
||||||
return d.login()
|
return d.login()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user