Skip to content

gcab-list-details: avoid runtime critical warning

Dirk-Jan C. Binnema requested to merge djcb/gcab:master into master

Saw some runtime errors when trying the to get some details on an fwupd cab file: https://fwupd.org/downloads/9ac1fdb3a25a79f2084c84e53d30ffa9fa93a9ed-Nitrokey-Storage-0.53.cab

,----
| ~/Downloads % gcab -l f53060d3930a0f140a0f1c6e42b857c5cede7b85-Nitrokey-Storage-0.50.cab
| LICENSE.txt 35823 2021-02-07 13:22:12 0x0
| README.txt 891 2021-02-07 13:22:12 0x0
| firmware.jcat 2960 2021-02-07 13:22:12 0x0
|
| (gcab:814994): GLib-CRITICAL **: 15:10:57.556: g_date_time_to_timezone: assertion 'datetime != NULL' failed
|
| (gcab:814994): GLib-CRITICAL **: 15:10:57.556: g_date_time_format: assertion 'datetime != NULL' failed
| firmware_V0.50.0.hex 529536 (null) 0x0
| firmware_V0.50.0.hex.asc 488 2021-02-07 13:22:12 0x0
| storage.metainfo.xml 1914 2021-02-07 13:22:12 0x0
`----

Apparently some file without a date; let's avoid the critical warning when we try to turn that into something printable.

Edited by Dirk-Jan C. Binnema

Merge request reports