Fix unsafe access to reg.indexes in updater

This commit is contained in:
Patrick Pacher 2020-05-04 10:57:59 +02:00
parent 9d7fd1235d
commit fa36efb71c
No known key found for this signature in database
GPG key ID: E8CD2DA160925A6D

View file

@ -80,7 +80,7 @@ func (reg *ResourceRegistry) ScanStorage(root string) error {
// registry is marked as online.
func (reg *ResourceRegistry) LoadIndexes() error {
var firstErr error
for _, idx := range reg.indexes {
for _, idx := range reg.getIndexes() {
err := reg.loadIndexFile(idx)
if err != nil && reg.Online {
// try to download the index file if a local disk version