From df7264f016db4fdf16b6f0031cb04d67f8763fe9 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Mon, 11 Dec 2023 16:52:21 +0800 Subject: [PATCH] Add helper to remove all OPFS files --- src/main/frontend/db_worker.cljs | 50 +++++++++++++++++-------------- src/main/frontend/persist_db.cljs | 1 + 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/main/frontend/db_worker.cljs b/src/main/frontend/db_worker.cljs index fe9309a589..49e79141a0 100644 --- a/src/main/frontend/db_worker.cljs +++ b/src/main/frontend/db_worker.cljs @@ -27,9 +27,7 @@ (or @*opfs-pool (p/let [^js pool (.installOpfsSAHPoolVfs @*sqlite #js {:name (str "logseq-pool-" graph) :initialCapacity 10})] - ;; (.removeVfs ^js pool) (reset! *opfs-pool pool) - (js/console.dir pool) pool))) (defn- init-sqlite-module! @@ -50,13 +48,6 @@ [repo] (str "/" repo ".sqlite")) -(comment - (defn- get-file-names - [graph] - (p/let [^js pool (