fix db worker

This commit is contained in:
micialware committed 2026-09-14 16:12:18 +03:00
1 parent fc8455e353
commit 154c55a7bb
4 files changed
+11 -8

No files matched your search

-4
View File
@@ -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;