Skip to content

Commit 463b2f6

Browse files
committed
Initialize WARC dedup table when CDX dedup file is being read
1 parent cb35e76 commit 463b2f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/warc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,10 +1260,6 @@ warc_start_new_file (bool meta)
12601260

12611261
warc_current_file_number++;
12621262

1263-
/* init the hash table */
1264-
warc_dedup_table = hash_table_new (1000, warc_hash_sha1_digest,
1265-
warc_cmp_sha1_digest);
1266-
12671263
base_filename_length = strlen (opt.warc_filename);
12681264
/* filename format: base + "-" + 5 digit serial number + ".warc.zst" */
12691265
new_filename = xmalloc (base_filename_length + 1 + 5 + 9 + 1);
@@ -1651,6 +1647,10 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
16511647
{
16521648
int nrecords;
16531649

1650+
/* init the hash table */
1651+
warc_dedup_table = hash_table_new (1000, warc_hash_sha1_digest,
1652+
warc_cmp_sha1_digest);
1653+
16541654
/* Load CDX data into the table. */
16551655

16561656
do

0 commit comments

Comments
 (0)