diff --git a/src/warc.c b/src/warc.c index bf9d58dc..bc1491e5 100644 --- a/src/warc.c +++ b/src/warc.c @@ -1224,10 +1224,6 @@ warc_start_new_file (bool meta) warc_current_file_number++; - /* init the hash table */ - warc_dedup_table = hash_table_new (1000, warc_hash_sha1_digest, - warc_cmp_sha1_digest); - base_filename_length = strlen (opt.warc_filename); /* filename format: base + "-" + 5 digit serial number + ".warc.zst" */ new_filename = xmalloc (base_filename_length + 1 + 5 + 9 + 1); @@ -1598,6 +1594,10 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n")); { int nrecords; + /* init the hash table */ + warc_dedup_table = hash_table_new (1000, warc_hash_sha1_digest, + warc_cmp_sha1_digest); + /* Load CDX data into the table. */ do