mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 03:16:37 +00:00
fix: don't unlink file when receiving the unlink event from watcher
This commit is contained in:
@@ -86,12 +86,11 @@
|
||||
|
||||
(and (= "unlink" type)
|
||||
(db/file-exists? repo path))
|
||||
nil
|
||||
;; (p/let [dir-exists? (fs/file-exists? dir "")]
|
||||
;; (when dir-exists?
|
||||
;; (when-let [page-name (db/get-file-page path)]
|
||||
;; (println "Delete page: " page-name ", file path: " path ".")
|
||||
;; (page-handler/delete! page-name #() :unlink-file? true))))
|
||||
(p/let [dir-exists? (fs/file-exists? dir "")]
|
||||
(when dir-exists?
|
||||
(when-let [page-name (db/get-file-page path)]
|
||||
(println "Delete page: " page-name ", file path: " path ".")
|
||||
(page-handler/delete! page-name #() :unlink-file? false))))
|
||||
|
||||
(and (contains? #{"add" "change" "unlink"} type)
|
||||
(string/ends-with? path "logseq/custom.css"))
|
||||
|
||||
Reference in New Issue
Block a user