Avoid infinite loop when no picture to load

This commit is contained in:
nemunaire 2022-09-04 22:45:30 +02:00
parent 4fcf12dff2
commit d4764ce485

View File

@ -71,7 +71,7 @@ func (l *LocalFileBackend) ListPictures(box string) ([]*Picture, error) {
return nil, err
}
var pictures []*Picture
pictures := make([]*Picture, 0)
for _, file := range files {
if !file.IsDir() {
pictures = append(pictures, l.createPictureInfo(path.Join(box, file.Name()), file.Name(), file))