fix(asset-sync): fix fs/unlink! args and ensure <unlink-asset succ

This commit is contained in:
rcmerci
2024-11-21 18:10:44 +08:00
committed by Tienson Qin
parent 47c195979a
commit 6eb94925a8

View File

@@ -267,10 +267,10 @@
(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
(let [file-path (path/path-join (config/get-repo-dir repo)
common-config/local-assets-dir
(str asset-block-id "." asset-type))]
(fs/unlink! repo-dir file-path {})))
(p/catch (fs/unlink! repo file-path {}) (constantly nil))))
(defn new-task--rtc-upload-asset
[repo asset-block-uuid-str asset-type checksum put-url]