fix(asset-sync): handle unlink-assets case in pull-remote-updates

This commit is contained in:
rcmerci
2024-11-21 13:41:01 +08:00
committed by Tienson Qin
parent 30b78fa39b
commit 156be117c1
4 changed files with 21 additions and 12 deletions

View File

@@ -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