fix: local relative path

This commit is contained in:
Noah Hsu
2022-06-27 20:37:05 +08:00
parent 7c0b86a9cd
commit 74973bc5b5
6 changed files with 25 additions and 5 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/alist-org/alist/v3/server/common"
"github.com/gin-gonic/gin"
stdpath "path"
"time"
)
@ -36,6 +37,7 @@ func List(c *gin.Context) {
}
req.Validate()
user := c.MustGet("user").(*model.User)
req.Path = stdpath.Join(user.BasePath, req.Path)
meta, _ := db.GetNearestMeta(req.Path)
c.Set("meta", meta)
if !canAccess(user, meta, req.Path, req.Password) {