2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00

fix: 部分情况下无法重命名文件

This commit is contained in:
2025-10-19 11:37:53 +08:00
parent 631bac6ea5
commit a3c9cfc8b5

View File

@@ -217,7 +217,7 @@ func (s *FileService) Move(w http.ResponseWriter, r *http.Request) {
continue
}
if io.IsDir(item.Source) && strings.HasPrefix(item.Target, item.Source) {
if io.IsDir(item.Source) && strings.HasPrefix(item.Target, item.Source+"/") {
Error(w, http.StatusForbidden, s.t.Get("please don't do this"))
return
}