fix(fs): global file writing in code editor

This commit is contained in:
Andelf
2023-03-16 09:46:52 +08:00
parent 3c0973013b
commit 98f4236309
6 changed files with 16 additions and 18 deletions

View File

@@ -41,9 +41,7 @@
(let [path (:file-path config)
repo (state/get-current-repo)
repo-dir (config/get-repo-dir repo)
rpath (path/trim-dir-prefix repo-dir path)
;; old-content (db/get-file rpath)
_ (prn ::calc rpath)]
rpath (path/trim-dir-prefix repo-dir path)]
(if rpath
;; in-db file
(let [old-content (db/get-file rpath)]