mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 14:54:19 +00:00
fu-common-cab: Correct handling of CAB files w/ nested directories and older libgcab
CABs like this are commonly created by `makecab.exe` on Windows. ``` DriverPackage\filename.bin DriverPackage\filename.metainfo.xml ``` On gcab < 1.0 the comparison needs to be made without this directory name.
This commit is contained in:
parent
237e842e7c
commit
30ad58c9cd
@ -33,7 +33,7 @@ _gcab_cabinet_get_file_by_name (GCabCabinet *cabinet, const gchar *basename)
|
||||
g_autoptr(GSList) files = gcab_folder_get_files (cabfolder);
|
||||
for (GSList *l = files; l != NULL; l = l->next) {
|
||||
GCabFile *cabfile = GCAB_FILE (l->data);
|
||||
if (g_strcmp0 (gcab_file_get_name (cabfile), basename) == 0)
|
||||
if (g_strcmp0 (gcab_file_get_extract_name (cabfile), basename) == 0)
|
||||
return cabfile;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user