mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 01:31:40 +02:00
🐛 Fix conflict on components path for v2 migration
This commit is contained in:
parent
6fa22c3a04
commit
66eca9ba4a
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,7 @@
|
||||||
[app.util.pointer-map :as pmap]
|
[app.util.pointer-map :as pmap]
|
||||||
[app.util.time :as dt]
|
[app.util.time :as dt]
|
||||||
[buddy.core.codecs :as bc]
|
[buddy.core.codecs :as bc]
|
||||||
|
[clojure.set :refer [rename-keys]]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
[datoteka.io :as io]
|
[datoteka.io :as io]
|
||||||
[promesa.exec :as px]
|
[promesa.exec :as px]
|
||||||
|
@ -995,6 +996,9 @@
|
||||||
[assets generic-name]
|
[assets generic-name]
|
||||||
(let [;; Group by first element of the path.
|
(let [;; Group by first element of the path.
|
||||||
groups (d/group-by #(first (cfh/split-path (:path %))) assets)
|
groups (d/group-by #(first (cfh/split-path (:path %))) assets)
|
||||||
|
;; If there is a group called as the generic-name we have to preserve it
|
||||||
|
unames (into #{} (keep str) (keys groups))
|
||||||
|
groups (rename-keys groups {generic-name (cfh/generate-unique-name unames generic-name)})
|
||||||
|
|
||||||
;; Split large groups in chunks of max-group-size elements
|
;; Split large groups in chunks of max-group-size elements
|
||||||
groups (loop [groups (seq groups)
|
groups (loop [groups (seq groups)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue