diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2025-01-23 14:48:25 +0100 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2025-01-23 14:48:25 +0100 |
| commit | 67cc5aa9b0d1bae03c425a2020feabd7bb45898f (patch) | |
| tree | 21a7d3f29389c55f731e381e53c1ea4d0b7349ea | |
| parent | 4340053981b34d5e4785fc530d035eb507c42be9 (diff) | |
| download | box-67cc5aa9b0d1bae03c425a2020feabd7bb45898f.tar.gz | |
Print deleted log instead of deleting
| -rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,6 @@ func (handler BoxHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } resourceId := path.Base(r.URL.Path) filename := filepath.Join(handler.filesPath, resourceId) - log.Printf("Deleting %s...", filename) err := os.Remove(filename) if err != nil { log.Println(err) @@ -67,6 +66,7 @@ func (handler BoxHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, err.Error()) return } + log.Printf("Deleted %s", filename) w.WriteHeader(http.StatusNoContent) case http.MethodPost: if r.URL.Path != "/upload" { |
