fix: match legacy operation log wording

This commit is contained in:
OpenClaw Agent
2026-09-21 16:45:51 +08:00
parent b593eeaddf
commit 66014a213d
+3 -3
View File
@@ -183,7 +183,7 @@ func (s *Server) newdir(w http.ResponseWriter, r *http.Request) {
http.Error(w, e.Error(), 500)
return
}
s.logOp(r, fmt.Sprintf("created directory:'%s'", p))
s.logOp(r, fmt.Sprintf("created directory '%s'", p))
writeJSON(w, map[string]any{"ok": true})
}
func (s *Server) rename(w http.ResponseWriter, r *http.Request) {
@@ -374,7 +374,7 @@ func (s *Server) upload(w http.ResponseWriter, r *http.Request) {
}
}
for _, name := range saved {
s.logOp(r, fmt.Sprintf("upload '%s'", path.Join(dir, name)))
s.logOp(r, fmt.Sprintf("uploaded '%s'", filepath.Base(name)))
}
w.WriteHeader(http.StatusCreated)
writeJSON(w, map[string]any{"ok": true, "files": saved})
@@ -587,7 +587,7 @@ func (s *Server) downloadDir(w http.ResponseWriter, r *http.Request) {
}
return nil
}
s.logOp(r, fmt.Sprintf("download directory '%s'", p))
s.logOp(r, fmt.Sprintf("downloaded '/%s'", strings.Trim(p, "/")))
if err := walk(p, ""); err != nil {
return
}