diff --git a/cmd/dwelling-upload-clean/main.go b/cmd/dwelling-upload-clean/main.go index 0857495..ed16a32 100644 --- a/cmd/dwelling-upload-clean/main.go +++ b/cmd/dwelling-upload-clean/main.go @@ -30,16 +30,10 @@ func main() { log.Fatalf("failed to open directory %s: %s\n", *uploadDir, err) } - var deletedCount int64 = 0 - var deletedSize int64 = 0 - for _, entry := range uploadsDir { if time.Now().UTC().Sub(entry.ModTime().UTC()) >= time.Duration(*keepFileForHours)*time.Hour { if err := os.Remove(path.Join(*uploadDir, entry.Name())); err != nil { log.Printf("failed to remove file %s: %s", entry.Name(), err) - } else { - deletedSize += entry.Size() - deletedCount++ } } }