mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 12:12:48 +00:00
trivial: Do not set the device parent when already set to the client
This can happen if the devices swap roles, and if the parent is set as itself then fwupdmgr refuses to show the child device.
This commit is contained in:
parent
ca6af0b8f1
commit
a89a70cc24
@ -565,6 +565,8 @@ fu_device_list_replace (FuDeviceList *self, FuDeviceItem *item, FuDevice *device
|
||||
|
||||
/* copy the parent if not already set */
|
||||
if (fu_device_get_parent (item->device) != NULL &&
|
||||
fu_device_get_parent (item->device) != device &&
|
||||
fu_device_get_parent (device) != item->device &&
|
||||
fu_device_get_parent (device) == NULL) {
|
||||
FuDevice *parent = fu_device_get_parent (item->device);
|
||||
g_debug ("copying parent %s to new device", fu_device_get_id (parent));
|
||||
|
Loading…
Reference in New Issue
Block a user