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,7 +66,12 @@ func getImages() []string {
if err != nil {
logger.WithError(err).Fatal("Error reading images directory")
}
var images []string
if len(files) == 0 {
logger.Warn("No images found in the images directory")
}
var images []string
for _, file := range files {
images = append(images, file.Name())
logger.Info("Loaded image:", file.Name())