🐛 fix windows check parent password

This commit is contained in:
微凉
2021-11-29 21:09:16 +08:00
parent ffdd88ec66
commit 71b1517de7
5 changed files with 13 additions and 9 deletions

View File

@ -7,7 +7,6 @@ import (
"github.com/Xhofe/alist/utils"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"path/filepath"
"strings"
)
@ -32,7 +31,7 @@ func Path(c *gin.Context) {
}
// TODO hide or ignore?
} else if conf.CheckParent {
if !CheckParent(filepath.Dir(req.Path), req.Password) {
if !CheckParent(utils.Dir(req.Path), req.Password) {
ErrorResp(c, fmt.Errorf("wrong password"), 401)
return
}