Use last part of udi as fallback for id
It can happen the Solid reports an empty string as serial. Let's just use the last part of the udi as id for now if that happens, it looks reasonable enough for this. Some exaples: udi = '/org/freedesktop/UPower/devices/battery_BAT0' udi = '/org/freedesktop/UPower/devices/keyboard_hid_0018o04F3o280Ex0001_battery' udi = '/org/freedesktop/UPower/devices/mouse_hidpp_battery_0'
Showing with 18 additions and 6 deletions