🐛 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

@ -8,7 +8,6 @@ import (
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"gorm.io/gorm"
"path/filepath"
)
func Auth(c *gin.Context) {
@ -52,7 +51,7 @@ func CheckParent(path string, password string) bool {
if path == "/" || path == "\\" {
return true
}
return CheckParent(filepath.Dir(path), password)
return CheckParent(utils.Dir(path), password)
}
}
@ -75,6 +74,6 @@ func CheckDownLink(path string, passwordMd5 string) bool {
if path == "/" || path == "\\" {
return true
}
return CheckDownLink(filepath.Dir(path), passwordMd5)
return CheckDownLink(utils.Dir(path), passwordMd5)
}
}