🔒 not allowed delete root folder
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package middlewares
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Xhofe/alist/conf"
|
||||
"github.com/Xhofe/alist/server/common"
|
||||
"github.com/Xhofe/alist/utils"
|
||||
@ -20,7 +19,7 @@ func DownCheck(c *gin.Context) {
|
||||
}
|
||||
pw := c.Query("pw")
|
||||
if !common.CheckDownLink(utils.Dir(rawPath), pw, utils.Base(rawPath)) {
|
||||
common.ErrorResp(c, fmt.Errorf("wrong password"), 401)
|
||||
common.ErrorStrResp(c, "Wrong password", 401)
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user