X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Flookup_table.c;h=46ab456198dba57caf6a88b77e73caa1953343bd;hp=3bb77a4b221ed57fe0c746fc8a8be99c5b746bf5;hb=751a849fe04a9230a661e38429ff4d971f74bdbf;hpb=f988d892c603e72d1c0a722c2b02b2418ff68c1e diff --git a/src/lookup_table.c b/src/lookup_table.c index 3bb77a4b..46ab4561 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -264,14 +264,17 @@ int write_lookup_table_entry(struct lookup_table_entry *lte, void *__out) out = __out; + /* do not write lookup table entries for empty files */ + if (lte->output_resource_entry.original_size == 0) + return 0; + /* Don't write entries that have not had file resources or metadata * resources written for them. */ if (lte->out_refcnt == 0) return 0; - if (lte->output_resource_entry.flags & WIM_RESHDR_FLAG_METADATA) { + if (lte->output_resource_entry.flags & WIM_RESHDR_FLAG_METADATA) DEBUG("Writing metadata entry at %lu\n", ftello(out)); - } p = put_resource_entry(buf, <e->output_resource_entry); p = put_u16(p, lte->part_number);