Skip to content

Commit 9368762

Browse files
authored
Revert "skip err log on os.IsNotExist (#330)" (#332)
This reverts commit bffe20c.
1 parent 68d3846 commit 9368762

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

base/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ func (s *Server) handlePProf(msg chat1.MsgSummary) error {
345345
// Cleanup after the file is sent.
346346
time.Sleep(time.Minute)
347347
s.Debug("cleaning up %s", outfile)
348-
if err = os.Remove(outfile); err != nil && !os.IsNotExist(err) {
348+
if err = os.Remove(outfile); err != nil {
349349
s.Errorf("unable to clean up %s: %v", outfile, err)
350350
}
351351
}()

webhookbot/webhookbot/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (h *HTTPSrv) handleHook(w http.ResponseWriter, r *http.Request) {
119119
// Cleanup after the file is sent.
120120
time.Sleep(time.Minute)
121121
h.Debug("cleaning up %s", filePath)
122-
if err = os.Remove(filePath); err != nil && !os.IsNotExist(err) {
122+
if err = os.Remove(filePath); err != nil {
123123
h.Errorf("unable to clean up %s: %v", filePath, err)
124124
}
125125
}()

0 commit comments

Comments
 (0)