fix: upload check if disable sub folder (close #3741)

pull/3763/head
Andy Hsu 2023-03-07 14:13:39 +08:00
parent d484219c48
commit 3d3f23ec9e
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ func FsUp(c *gin.Context) {
return
}
}
if !(common.CanAccess(user, meta, path, password) && (user.CanWrite() || common.CanWrite(meta, path))) {
if !(common.CanAccess(user, meta, path, password) && (user.CanWrite() || common.CanWrite(meta, stdpath.Dir(path)))) {
common.ErrorResp(c, errs.PermissionDenied, 403)
c.Abort()
return