mirror of https://github.com/logseq/logseq
fix(electron): global config dir name under windows
parent
1ff15171ed
commit
046e47d22e
|
@ -35,12 +35,19 @@
|
|||
([url options]
|
||||
(_fetch url (bean/->js (merge options {:agent @*fetchAgent})))))
|
||||
|
||||
(defn fix-win-path!
|
||||
[path]
|
||||
(when path
|
||||
(if win32?
|
||||
(string/replace path "\\" "/")
|
||||
path)))
|
||||
|
||||
(defn get-ls-dotdir-root
|
||||
[]
|
||||
(let [lg-dir (path/join (.getPath app "home") ".logseq")]
|
||||
(if-not (fs/existsSync lg-dir)
|
||||
(do (fs/mkdirSync lg-dir) lg-dir)
|
||||
lg-dir)))
|
||||
(when-not (fs/existsSync lg-dir)
|
||||
(fs/mkdirSync lg-dir))
|
||||
(fix-win-path! lg-dir)))
|
||||
|
||||
(defn get-ls-default-plugins
|
||||
[]
|
||||
|
@ -214,13 +221,6 @@
|
|||
(let [ext (string/lower-case (path/extname path))]
|
||||
(contains? #{".md" ".markdown" ".org" ".js" ".edn" ".css"} ext)))
|
||||
|
||||
(defn fix-win-path!
|
||||
[path]
|
||||
(when path
|
||||
(if win32?
|
||||
(string/replace path "\\" "/")
|
||||
path)))
|
||||
|
||||
(defn read-file
|
||||
[path]
|
||||
(try
|
||||
|
|
Loading…
Reference in New Issue