|
@@ -405,11 +405,6 @@ func (devices *DeviceSet) deviceFileWalkFunction(path string, finfo os.FileInfo)
|
|
return fmt.Errorf("Error loading device metadata file %s", hash)
|
|
return fmt.Errorf("Error loading device metadata file %s", hash)
|
|
}
|
|
}
|
|
|
|
|
|
- if dinfo.DeviceID > maxDeviceID {
|
|
|
|
- logrus.Errorf("Ignoring Invalid DeviceID=%d", dinfo.DeviceID)
|
|
|
|
- return nil
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
devices.Lock()
|
|
devices.Lock()
|
|
devices.markDeviceIDUsed(dinfo.DeviceID)
|
|
devices.markDeviceIDUsed(dinfo.DeviceID)
|
|
devices.Unlock()
|
|
devices.Unlock()
|
|
@@ -715,6 +710,11 @@ func (devices *DeviceSet) loadMetadata(hash string) *devInfo {
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if info.DeviceID > maxDeviceID {
|
|
|
|
+ logrus.Errorf("Ignoring Invalid DeviceId=%d", info.DeviceID)
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+
|
|
return info
|
|
return info
|
|
}
|
|
}
|
|
|
|
|