Skip to content

Commit e003175

Browse files
committed
Reduce nanoid tries
1 parent 0e3665b commit e003175

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/ql-vscode/src/databases/database-fetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ async function getStorageFolder(
456456
if (counter <= DUPLICATE_FILENAMES_TRIES) {
457457
// First try to use a counter to make the name unique.
458458
folderName = `${lastName}-${counter}`;
459-
} else if (counter <= 2 * DUPLICATE_FILENAMES_TRIES) {
459+
} else if (counter <= DUPLICATE_FILENAMES_TRIES + 5) {
460460
// If there are more than 10,000 similarly named databases,
461461
// give up on using a counter and use a random string instead.
462462
folderName = `${lastName}-${nanoid()}`;

0 commit comments

Comments
 (0)