handle missing images directory

This commit is contained in:
raf 2025-02-08 16:31:15 +03:00
parent 750162d8c5
commit bae551520a
No known key found for this signature in database
GPG key ID: EED98D11B85A2819

View file

@ -66,6 +66,11 @@ func getImages() []string {
if err != nil { if err != nil {
logger.WithError(err).Fatal("Error reading images directory") logger.WithError(err).Fatal("Error reading images directory")
} }
if len(files) == 0 {
logger.Warn("No images found in the images directory")
}
var images []string var images []string
for _, file := range files { for _, file := range files {
images = append(images, file.Name()) images = append(images, file.Name())