From f2fa0f8de04393d00037dda01e907d2933d1ce8c Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Fri, 22 Mar 2024 21:50:54 -0700 Subject: [PATCH] cleanup --- src/crawler.ts | 4 ++-- src/util/warcwriter.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/crawler.ts b/src/crawler.ts index c0c28ff4..296be211 100644 --- a/src/crawler.ts +++ b/src/crawler.ts @@ -1430,7 +1430,7 @@ self.__bx_behaviors.selectMainBehavior(); // remove tmp-cdx, now that it's already been added to the WACZ and/or // copied to indexes - await fsp.rm(path.join(this.collDir, "tmp-cdx"), { + await fsp.rm(this.tempCdxDir, { recursive: true, force: true, }); @@ -1544,7 +1544,7 @@ self.__bx_behaviors.selectMainBehavior(); // todo: replace with js-wacz impl eventually async _addCDXJ(wacz: WACZ) { - const dirPath = path.join(this.collDir, "tmp-cdx"); + const dirPath = this.tempCdxDir; try { const cdxjFiles = await fsp.readdir(dirPath); diff --git a/src/util/warcwriter.ts b/src/util/warcwriter.ts index 5214028e..7d88c737 100644 --- a/src/util/warcwriter.ts +++ b/src/util/warcwriter.ts @@ -55,8 +55,6 @@ export class WARCWriter implements IndexerOffsetLength { }) { this.archivesDir = archivesDir; this.tempCdxDir = tempCdxDir; - // for now, disabling CDX - this.tempCdxDir = undefined; this.logDetails = logDetails; this.gzip = gzip; this.rolloverSize = rolloverSize;