diff --git a/src/backup.ts b/src/backup.ts index db39266..b3eb8d8 100644 --- a/src/backup.ts +++ b/src/backup.ts @@ -972,6 +972,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.lock) { return runLockedBackup(lib, opts, downloadDirectory, opts.lock); }