fix db worker
This commit is contained in:
1 parent
fc8455e353
commit
154c55a7bb
4 files changed
+11
-8
No files matched your search
@@ -70,12 +70,8 @@ export async function readDatabaseFile(): Promise<Uint8Array> {
|
||||
export async function hasDatabaseFile(): Promise<boolean> {
|
||||
try {
|
||||
const root = await opfsRoot();
|
||||
console.log("in root dir " + root.entries.length + " files");
|
||||
const handle = await root.getFileHandle(DB_FILENAME);
|
||||
const file = await handle.getFile();
|
||||
console.log(file.size);
|
||||
console.log(file.name);
|
||||
console.log(handle);
|
||||
return file.size > 0;
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user