fix: match legacy operation log wording
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user