Merge remote-tracking branch 'origin/feat/electron' into feat/electron

pull/1179/head
charlie 2021-01-27 18:29:09 +08:00
commit 8d03654a4b
2 changed files with 9 additions and 7 deletions

View File

@ -115,12 +115,14 @@
(defn mkdir-if-not-exists
[dir]
(when dir
(util/p-handle
(stat dir nil)
(fn [_stat])
(fn [error]
(mkdir! dir)))))
(->
(when dir
(util/p-handle
(stat dir nil)
(fn [_stat])
(fn [error]
(mkdir! dir))))
(p/catch (fn [_error] nil))))
(defn create-if-not-exists
([repo dir path]

View File

@ -87,7 +87,7 @@
[repo-url]
(spec/validate :repos/url repo-url)
(let [repo-dir (config/get-repo-dir repo-url)
path (config/get-custom-css-path)
path (str config/app-name "/" config/custom-css-file)
file-path (str "/" path)
default-content ""]
(p/let [_ (fs/mkdir-if-not-exists (str repo-dir "/" config/app-name))