feat: alist v3 index permission (#2653)

* feat: alist v3 index permission

* fix allowIndexed check

Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
BoYanZh
2022-12-10 19:03:09 +08:00
committed by GitHub
parent 446f82888c
commit 62ea93837c
5 changed files with 30 additions and 10 deletions

View File

@ -5,6 +5,7 @@ import (
"io"
"path"
"strconv"
"strings"
"github.com/alist-org/alist/v3/drivers/base"
"github.com/alist-org/alist/v3/internal/driver"
@ -32,9 +33,7 @@ func (d *AListV3) Init(ctx context.Context, storage model.Storage) error {
if err != nil {
return err
}
if len(d.Addition.Address) > 0 && string(d.Addition.Address[len(d.Addition.Address)-1]) == "/" {
d.Addition.Address = d.Addition.Address[0 : len(d.Addition.Address)-1]
}
d.Addition.Address = strings.TrimSuffix(d.Addition.Address, "/")
// TODO login / refresh token
//op.MustSaveDriverStorage(d)
return err