Avoid infinite loop when no picture to load
This commit is contained in:
parent
4fcf12dff2
commit
d4764ce485
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user