From: Eric Biggers Date: Sun, 27 Apr 2014 05:26:26 +0000 (-0500) Subject: read_wim_lookup_table(): Warn only once for all duplicate streams X-Git-Tag: v1.7.0~259 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=fc774e55444a3a631608e0e2e1a201e2c29c85c2 read_wim_lookup_table(): Warn only once for all duplicate streams --- diff --git a/src/lookup_table.c b/src/lookup_table.c index 1058bf26..889013e0 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -615,6 +615,7 @@ read_wim_lookup_table(WIMStruct *wim) struct wim_resource_spec *cur_rspec; void *buf; bool back_to_back_pack; + size_t num_duplicate_entries = 0; DEBUG("Reading lookup table."); @@ -891,8 +892,7 @@ read_wim_lookup_table(WIMStruct *wim) * resource. */ duplicate_entry = lookup_stream(table, cur_entry->hash); if (duplicate_entry) { - WARNING("The WIM lookup table contains two entries " - "with the same SHA1 message digest!"); + num_duplicate_entries++; free_lookup_table_entry(cur_entry); continue; } @@ -920,6 +920,12 @@ read_wim_lookup_table(WIMStruct *wim) put_image_metadata(wim->image_metadata[i], NULL); wim->hdr.image_count = wim->current_image; } + + if (num_duplicate_entries > 0) { + WARNING("Ignoring %zu duplicate streams in the WIM lookup table", + num_duplicate_entries); + } + DEBUG("Done reading lookup table."); wim->lookup_table = table; ret = 0;