Only at init time; maybe it should be able to recover immediately!
I mean, "Fix missing root in IndexedDB after database cleared" is, well, maybe not inaccurate, but it doesn't happen immediately; it doesn't recover immediately. It takes a page refresh of an app, generally.
Also I took a stab at testing this, and this passes, but haven't tested whether the test tests it yet:
// Does the root directory exist in empty file systems? It should!
BrowserFS.FileSystem.IndexedDB.Create({}, (e, idbfs) => {
idbfs.stat('/', true, function (err) {
if (err) throw err;
});
});
Only at init time; maybe it should be able to recover immediately!
I mean, "Fix missing root in IndexedDB after database cleared" is, well, maybe not inaccurate, but it doesn't happen immediately; it doesn't recover immediately. It takes a page refresh of an app, generally.
Also I took a stab at testing this, and this passes, but haven't tested whether the test tests it yet:
Fixes #225