feat(electron): trying to fix custom.css

This commit is contained in:
Tienson Qin
2021-01-27 18:27:52 +08:00
parent 374af200cf
commit 210ecc9353
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))