2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

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

This commit is contained in:
2025-10-19 11:41:51 +08:00
parent a3c9cfc8b5
commit 490d789513

View File

@@ -246,7 +246,7 @@ func (s *FileService) Copy(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
}