Skip to content

Commit 2dcaacc

Browse files
committed
[#57] Throw an error if attempting to unpack a directory that is not a valid LevelDB database.
1 parent 98bad19 commit 2dcaacc

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 1.1.0
22

33
### Improvements
4+
- Attempting to unpack a directory that is not a valid LevelDB database now throws an error.
45
- (Jeff Hitchcock) Added the `--folders` command-line flag, and corresponding `folders` parameter to `extractPack`. When used, this option writes the pack's entries to a directory structure matching the pack's internal Folder document structure.
56

67
### Fixes

lib/package.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ async function extractClassicLevel(pack, dest, {
416416
yaml, yamlOptions, jsonOptions, log, folders, transformEntry, transformName, transformFolderName
417417
}) {
418418
// Load the directory as a ClassicLevel DB.
419-
const db = new ClassicLevel(pack, { keyEncoding: "utf8", valueEncoding: "json" });
419+
const db = new ClassicLevel(pack, { keyEncoding: "utf8", valueEncoding: "json", createIfMissing: false });
420420

421421
// Build up the folder structure
422422
if ( folders ) {

0 commit comments

Comments
 (0)