Skip to content

Commit 98d7eb6

Browse files
committed
Initialize WARC dedup table when CDX dedup file is being read
1 parent 3a99457 commit 98d7eb6

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
@@ -1224,10 +1224,6 @@ warc_start_new_file (bool meta)
12241224

12251225
warc_current_file_number++;
12261226

1227-
/* init the hash table */
1228-
warc_dedup_table = hash_table_new (1000, warc_hash_sha1_digest,
1229-
warc_cmp_sha1_digest);
1230-
12311227
base_filename_length = strlen (opt.warc_filename);
12321228
/* filename format: base + "-" + 5 digit serial number + ".warc.zst" */
12331229
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"));
15981594
{
15991595
int nrecords;
16001596

1597+
/* init the hash table */
1598+
warc_dedup_table = hash_table_new (1000, warc_hash_sha1_digest,
1599+
warc_cmp_sha1_digest);
1600+
16011601
/* Load CDX data into the table. */
16021602

16031603
do

0 commit comments

Comments
 (0)