Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions harextract.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
harent.pathcomps = fullpath; // .path string will be set below
if (!ent.response.content.text)
harent.error = 'No content.';
else if (ent.response.content.encoding != 'base64')
else if (!!ent.response.content.encoding && ent.response.content.encoding != 'base64')
harent.error = "Can't decode.";
if (harent.error) {
console.log(`harextract: skipped ${harent.name} (${id}): ${harent.error}`);
Expand Down Expand Up @@ -279,9 +279,9 @@
if (filepath.startsWith('/'))
filepath = filepath.substring(1);
let encoding = data[ent.id].response.content.encoding;
if (encoding != 'base64')
if (!!encoding && encoding != 'base64')
throw new Error(`Unsupported encoding for ${ent.name} (${ent.id}): ${encoding}`);
zip.file(filepath, data[ent.id].response.content.text, { base64: true });
zip.file(filepath, data[ent.id].response.content.text, { base64: !!encoding });
} catch (e) {
console.log(e);
}
Expand Down