mirror of https://github.com/logseq/logseq
fix(desktop): Desktop client cannot delete files #1346
parent
12e23c932a
commit
c54f4ba3a9
|
@ -278,7 +278,7 @@
|
|||
[repo file]
|
||||
(when-not (string/blank? file)
|
||||
(->
|
||||
(p/let [_ (git/remove-file repo file)
|
||||
(p/let [_ (or (config/local-db? repo) (git/remove-file repo file))
|
||||
result (fs/unlink! (config/get-repo-path repo file) nil)]
|
||||
(when-let [file (db/entity repo [:file/path file])]
|
||||
(common-handler/check-changed-files-status)
|
||||
|
@ -291,7 +291,7 @@
|
|||
(when (seq tx-data)
|
||||
(db/transact! repo tx-data)))))
|
||||
(p/catch (fn [err]
|
||||
(prn "error: " err))))))
|
||||
(js/console.error "error: " err))))))
|
||||
|
||||
(defn re-index!
|
||||
[file]
|
||||
|
|
|
@ -278,12 +278,12 @@
|
|||
(db/transact! tx-data)
|
||||
;; remove file
|
||||
(->
|
||||
(p/let [_ (git/remove-file repo file-path)
|
||||
(p/let [_ (or (config/local-db? repo) (git/remove-file repo file-path))
|
||||
_ (fs/unlink! (config/get-repo-path repo file-path) nil)]
|
||||
(common-handler/check-changed-files-status)
|
||||
(repo-handler/push-if-auto-enabled! repo))
|
||||
(p/catch (fn [err]
|
||||
(prn "error: " err))))))
|
||||
(js/console.error "error: " err))))))
|
||||
|
||||
(db/transact! [[:db.fn/retractEntity [:page/name page-name]]])
|
||||
|
||||
|
|
Loading…
Reference in New Issue