trivial: Do not return failure if a device flag is already set

If we have multiple versions of upgrades/downgrades we'll be setting the
REPORTED flags for multiple history entries at once.
This commit is contained in:
Richard Hughes 2018-02-01 11:54:26 +00:00
parent 1a24d9da90
commit ee7e764603

View File

@ -630,13 +630,8 @@ fu_engine_modify_device (FuEngine *self,
"key %s not a valid flag", key);
return FALSE;
}
if (fu_device_has_flag (device, flag)) {
g_set_error_literal (error,
FWUPD_ERROR,
FWUPD_ERROR_NOT_SUPPORTED,
"device already has that flag");
return FALSE;
}
if (fu_device_has_flag (device, flag))
return TRUE;
if (flag != FWUPD_DEVICE_FLAG_REPORTED &&
flag != FWUPD_DEVICE_FLAG_NOTIFIED) {
g_set_error (error,