quak backup works on up to the content pool's limit of originals at once (closes #182) #192
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user