Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,65 @@
'use strict';
/* exported enumerateAll */
// With the removal of composite storage, this function emulates
// the composite storage enumeration (i.e. return files from
// all of the storage areas).
function enumerateAll(storages, dir, options) {
var storageIndex = 0;
var ds_cursor = null;
var cursor = {
continue: function cursor_continue() {
ds_cursor.continue();
}
};
function onsuccess(e) {
cursor.result = e.target.result;
if (!cursor.result) {
storageIndex++;
if (storageIndex < storages.length) {
enumerateNextStorage();
return;
}
// If we've run out of storages, then we fall through and call
// onsuccess with the null result.
}
if (cursor.onsuccess) {
try {
cursor.onsuccess(e);
} catch (err) {
console.warn('enumerateAll onsuccess threw', err);
}
}
}
function onerror(e) {
cursor.error = e.target.error;
if (cursor.error.name === 'NotFoundError' &&
storageIndex !== storages.length - 1) {
storageIndex++;
enumerateNextStorage();
return;
}
if (cursor.onerror) {
try {
cursor.onerror(e);
} catch (err) {
console.warn('enumerateAll onerror threw', err);
}
}
}
function enumerateNextStorage() {
// The || {} on the next line is required to make enumerate work properly
// on v1-train.
ds_cursor = storages[storageIndex].enumerate(dir, options || {});
ds_cursor.onsuccess = onsuccess;
ds_cursor.onerror = onerror;
}
enumerateNextStorage();
return cursor;
}