+2
-10
lines changedFilter options
+2
-10
lines changed Original file line number Diff line number Diff line change
@@ -1522,8 +1522,6 @@ vAPI.cloud = (( ) => {
1522
1522
maxChunkSize = evalMaxChunkSize();
1523
1523
}, { once: true });
1524
1524
1525
-
const maxStorageSize = QUOTA_BYTES;
1526
-
1527
1525
const options = {
1528
1526
defaultDeviceName: window.navigator.platform,
1529
1527
deviceName: undefined,
@@ -1562,13 +1560,7 @@ vAPI.cloud = (( ) => {
1562
1560
const deleteChunks = async function(datakey, start) {
1563
1561
const keys = [];
1564
1562
1565
-
// No point in deleting more than:
1566
-
// - The max number of chunks per item
1567
-
// - The max number of chunks per storage limit
1568
-
const n = Math.min(
1569
-
maxChunkCountPerItem,
1570
-
Math.ceil(maxStorageSize / maxChunkSize)
1571
-
);
1563
+
const n = await getCoarseChunkCount(datakey);
1572
1564
for ( let i = start; i < n; i++ ) {
1573
1565
keys.push(datakey + i.toString());
1574
1566
}
@@ -1612,7 +1604,7 @@ vAPI.cloud = (( ) => {
1612
1604
// this will free storage space which could otherwise cause the push
1613
1605
// operation to fail.
1614
1606
try {
1615
-
await deleteChunks(datakey, chunkCount);
1607
+
await deleteChunks(datakey, chunkCount + 1);
1616
1608
} catch (reason) {
1617
1609
}
1618
1610
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4