diff --git a/cmd/dwelling-upload-clear/main.go b/cmd/dwelling-upload-clear/main.go index f3298d8..df3f5f3 100644 --- a/cmd/dwelling-upload-clear/main.go +++ b/cmd/dwelling-upload-clear/main.go @@ -28,7 +28,7 @@ func main() { var deteted_size int64 = 0 for _, entry := range uploads_dir { - if time.Duration(entry.ModTime().UTC().Sub(time.Now().UTC()).Hours()) >= 24*time.Hour { + if time.Duration(entry.ModTime().UTC().Sub(time.Now().UTC()).Hours()) >= time.Duration(config.Uploads.Limits.KeepForHours)*time.Hour { if err := os.Remove(path.Join(config.Uploads.Directory, entry.Name())); err != nil { log.Fatalln("failed to remove file ", entry.Name(), ": ", err) }