Commit 80eb8242 by Torkel Ödegaard

fix(cleanup): check if images dir exists

parent c28d0047
......@@ -52,6 +52,10 @@ func (service *CleanUpService) start(ctx context.Context) error {
}
func (service *CleanUpService) cleanUpTmpFiles() {
if _, err := os.Stat(setting.ImagesDir); os.IsNotExist(err) {
return
}
files, err := ioutil.ReadDir(setting.ImagesDir)
if err != nil {
service.log.Error("Problem reading image dir", "error", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment