🐛 Fix incorrect data id assignation on creating a snapshot (#5934)

* 📎 Set proper name to relink-refs mechanism function

* 🐛 Fix incorrect id assignation on snapshot file resolution

* ♻️ Use uniform api for file retrieval on file snapshot code
This commit is contained in:
Andrey Antukh 2025-02-24 11:05:16 +01:00 committed by GitHub
parent 786383c25d
commit 15d09eb0d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 120 additions and 97 deletions

View file

@ -570,10 +570,9 @@
(into xform:collect-media-refs (vals (:components data)))
(into (keys (:media data)))))
(defn relink-media-refs
"A function responsible to analyze all file data and replace the
old :component-file reference with the new ones, using the provided
file-index."
(defn relink-refs
"A function responsible to analyze the file data or shape for references
and apply lookup-index on it."
[data lookup-index]
(letfn [(process-map-form [form]
(cond-> form
@ -724,7 +723,7 @@
(defn split-by-last-period
"Splits a string into two parts:
the text before and including the last period,
the text before and including the last period,
and the text after the last period."
[s]
(if-let [last-period (str/last-index-of s ".")]