fix(webdav): can't rename on infini-cloud (close #4333)

This commit is contained in:
Andy Hsu
2023-05-08 14:21:12 +08:00
parent b69fc8c306
commit ee4ac81677
2 changed files with 12 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import (
"net/http"
"github.com/alist-org/alist/v3/drivers/webdav/odrvcookie"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/pkg/gowebdav"
)
@ -29,3 +30,10 @@ func (d *WebDav) setClient() error {
d.client = c
return nil
}
func getPath(obj model.Obj) string {
if obj.IsDir() {
return obj.GetPath() + "/"
}
return obj.GetPath()
}