enhance: add logseq/.recycle to store removed files for backup

This commit is contained in:
Tienson Qin
2021-07-15 03:01:02 +08:00
parent ec8ddf29a8
commit f2ce4a1177
12 changed files with 59 additions and 28 deletions

View File

@@ -1413,7 +1413,8 @@
(when (and local? delete-local?)
;; FIXME: should be relative to current block page path
(when-let [href (if (util/electron?) href (second (re-find #"\((.+)\)$" full-text)))]
(fs/unlink! (config/get-repo-path
(fs/unlink! repo
(config/get-repo-path
repo (-> href
(string/replace #"^../" "/")
(string/replace #"^assets://" ""))) nil)))))