浏览代码

fix: invalid db when uploading new plugin

Tienson Qin 1 周之前
父节点
当前提交
c32a10e7b5
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/main/frontend/handler/plugin.cljs
  2. 1 1
      src/main/frontend/handler/plugin_config.cljs

+ 1 - 1
src/main/frontend/handler/plugin.cljs

@@ -631,7 +631,7 @@
   [dirname ^js default]
   (fn [key]
     (when-let [key (and key (name key))]
-      (let [repo ""
+      (let [repo (state/get-current-repo)
             dotroot (get-ls-dotdir-root)
             filepath (util/node-path.join dotroot dirname (str key ".json"))]
         (if (util/electron?)

+ 1 - 1
src/main/frontend/handler/plugin_config.cljs

@@ -55,7 +55,7 @@ when a plugin is installed, updated or removed"
                     (update-vals #(select-keys % common-plugin-keys))
                     pprint/pprint
                     with-out-str)]
-    (fs/create-if-not-exists "" nil (plugin-config-path) content)))
+    (fs/create-if-not-exists (state/get-current-repo) nil (plugin-config-path) content)))
 
 (defn- determine-plugins-to-change
   "Given installed plugins state and plugins from plugins.edn,