mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
fix: 删除目录校验 (#7035)
This commit is contained in:
parent
ec372dbb98
commit
4c01b1e542
@ -213,7 +213,7 @@ func (f *FileService) Create(op request.FileCreate) error {
|
||||
func (f *FileService) Delete(op request.FileDelete) error {
|
||||
if op.IsDir {
|
||||
excludeDir := global.CONF.System.DataDir
|
||||
if strings.Contains(op.Path, ".1panel_clash") || op.Path == excludeDir {
|
||||
if filepath.Base(op.Path) == ".1panel_clash" || op.Path == excludeDir {
|
||||
return buserr.New(constant.ErrPathNotDelete)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user