fix(fs): file editing in nfs

This commit is contained in:
Andelf
2023-03-16 18:23:57 +08:00
parent f6961b4b1c
commit 97b534301b
3 changed files with 24 additions and 13 deletions

View File

@@ -41,7 +41,8 @@
(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)]
rpath (when (string/starts-with? path repo-dir)
(path/trim-dir-prefix repo-dir path))]
(if rpath
;; in-db file
(let [db-content (db/get-file rpath)