fix: close file watcher when exit the app

This commit is contained in:
Tienson Qin
2021-09-06 22:18:45 +08:00
parent 10e7a9fbd6
commit e0baf4b05c
3 changed files with 11 additions and 5 deletions

View File

@@ -49,10 +49,7 @@
(js/console.warn "Can't get file in the db: " path)
(and (= "change" type)
;; ignore truncate
(not (string/blank? content))
(not= (string/trim content)
(string/trim (or (db/get-file repo path) ""))))
(not= (string/trim content) (string/trim db-content)))
(p/let [_ (file-handler/alter-file repo path content {:re-render-root? true
:from-disk? true})]
(set-missing-block-ids! content)