You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Desktop: Support export of multiple notes to PDF files. (#2468)
* Support export of multiple notes to pdf files. * Update in response to review comments. Find unique filenames when exporting multiple pdfs. Simplify delay. * Eliminate redundant retries and fix error message in fs shim unique filename search. * Make output filenames consistent between single and multi pdf export. * Remove unnecessary white space. * Remove legacy sleep in pdf export and add a little more variability to unique filename search.
This commit is contained in:
@ -37,8 +37,11 @@ class FsDriverBase {
|
||||
if (!exists) return nameToTry;
|
||||
nameToTry = `${nameNoExt} (${counter})${extension}`;
|
||||
counter++;
|
||||
if (counter >= 1000) nameToTry = `${nameNoExt} (${new Date().getTime()})${extension}`;
|
||||
if (counter >= 10000) throw new Error('Cannot find unique title');
|
||||
if (counter >= 1000) {
|
||||
nameToTry = `${nameNoExt} (${new Date().getTime()})${extension}`;
|
||||
await time.msleep(10);
|
||||
}
|
||||
if (counter >= 1100) throw new Error('Cannot find unique filename');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user