mirror of https://github.com/logseq/logseq
fix(fs): editing global config on windows
parent
3406795066
commit
90db107e4d
|
@ -80,12 +80,12 @@
|
|||
[path format] (:rum/args state)
|
||||
repo-dir (config/get-repo-dir (state/get-current-repo))
|
||||
[dir path] (cond
|
||||
;; assume local file, relative path
|
||||
(not (string/starts-with? path "/"))
|
||||
[repo-dir path]
|
||||
(path/absolute? path)
|
||||
[nil path]
|
||||
|
||||
:else ;; global file on native platform
|
||||
[nil path])]
|
||||
;; assume local file, relative path
|
||||
:else
|
||||
[repo-dir path])]
|
||||
(when (and format (contains? (gp-config/text-formats) format))
|
||||
(p/let [content (fs/read-file dir path)]
|
||||
(reset! *content (or content ""))))
|
||||
|
|
Loading…
Reference in New Issue