Преглед изворни кода

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]
   [dirname ^js default]
   (fn [key]
   (fn [key]
     (when-let [key (and key (name key))]
     (when-let [key (and key (name key))]
-      (let [repo ""
+      (let [repo (state/get-current-repo)
             dotroot (get-ls-dotdir-root)
             dotroot (get-ls-dotdir-root)
             filepath (util/node-path.join dotroot dirname (str key ".json"))]
             filepath (util/node-path.join dotroot dirname (str key ".json"))]
         (if (util/electron?)
         (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))
                     (update-vals #(select-keys % common-plugin-keys))
                     pprint/pprint
                     pprint/pprint
                     with-out-str)]
                     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
 (defn- determine-plugins-to-change
   "Given installed plugins state and plugins from plugins.edn,
   "Given installed plugins state and plugins from plugins.edn,