From 2cc35b74174197a18cf1c9f62a89263dbee9639e Mon Sep 17 00:00:00 2001 From: zoom-ua <65734190+zoom-ua@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:42:34 -0500 Subject: [PATCH] Revert "skip err log on os.IsNotExist (#330)" This reverts commit bffe20c03d7a101ca96e19ee8df139bdc5aacd14. --- base/server.go | 2 +- webhookbot/webhookbot/http.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/server.go b/base/server.go index e69f7e6b..f21f6d13 100644 --- a/base/server.go +++ b/base/server.go @@ -345,7 +345,7 @@ func (s *Server) handlePProf(msg chat1.MsgSummary) error { // Cleanup after the file is sent. time.Sleep(time.Minute) s.Debug("cleaning up %s", outfile) - if err = os.Remove(outfile); err != nil && !os.IsNotExist(err) { + if err = os.Remove(outfile); err != nil { s.Errorf("unable to clean up %s: %v", outfile, err) } }() diff --git a/webhookbot/webhookbot/http.go b/webhookbot/webhookbot/http.go index a62eafd4..41c30412 100644 --- a/webhookbot/webhookbot/http.go +++ b/webhookbot/webhookbot/http.go @@ -119,7 +119,7 @@ func (h *HTTPSrv) handleHook(w http.ResponseWriter, r *http.Request) { // Cleanup after the file is sent. time.Sleep(time.Minute) h.Debug("cleaning up %s", filePath) - if err = os.Remove(filePath); err != nil && !os.IsNotExist(err) { + if err = os.Remove(filePath); err != nil { h.Errorf("unable to clean up %s: %v", filePath, err) } }()