diff --git a/src/backup.ts b/src/backup.ts index 952da60..08e0474 100644 --- a/src/backup.ts +++ b/src/backup.ts @@ -933,6 +933,14 @@ export const runBackup = async ( "open the library with one)", ); } + // As `BoundedPool` does. A limit below 1, or one that is not a number, + // would back up no original and end with no error. + const { contentConcurrency } = lib; + if (!Number.isInteger(contentConcurrency) || contentConcurrency < 1) { + throw new RangeError( + `contentConcurrency must be a positive integer, got ${contentConcurrency}`, + ); + } if (opts.lockHeld) { return runLockedBackup(lib, opts, downloadDirectory); }