Pārlūkot izejas kodu

fix: invalid db when uploading new plugin

Tienson Qin 6 dienas atpakaļ
vecāks
revīzija
c32a10e7b5

+ 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,