mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 01:16:27 +00:00
fix(asset-sync): handle unlink-assets case in pull-remote-updates
This commit is contained in:
@@ -244,10 +244,9 @@
|
||||
|
||||
(defn <read-asset
|
||||
[repo asset-block-id asset-type]
|
||||
(let [asset-block-id-str (str asset-block-id)
|
||||
repo-dir (config/get-repo-dir repo)
|
||||
(let [repo-dir (config/get-repo-dir repo)
|
||||
file-path (path/path-join common-config/local-assets-dir
|
||||
(str asset-block-id-str "." asset-type))]
|
||||
(str asset-block-id "." asset-type))]
|
||||
(fs/read-file repo-dir file-path {})))
|
||||
|
||||
(defn <get-asset-file-metadata
|
||||
@@ -266,6 +265,13 @@
|
||||
(str asset-block-id-str "." asset-type))]
|
||||
(fs/write-file! repo repo-dir file-path data {})))
|
||||
|
||||
(defn <unlink-asset
|
||||
[repo asset-block-id asset-type]
|
||||
(let [repo-dir (config/get-repo-dir repo)
|
||||
file-path (path/path-join common-config/local-assets-dir
|
||||
(str asset-block-id "." asset-type))]
|
||||
(fs/unlink! repo-dir file-path {})))
|
||||
|
||||
(defn new-task--rtc-upload-asset
|
||||
[repo asset-block-uuid-str asset-type put-url]
|
||||
(m/sp
|
||||
|
||||
Reference in New Issue
Block a user