0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-13 07:21:40 -05:00

Only create snapshot if file is modified (on srepl helper)

This commit is contained in:
Andrey Antukh 2025-01-23 13:49:17 +01:00
parent 541ed6282f
commit 4c1312d4f6

View file

@ -123,10 +123,6 @@
(defn process-file!
[system file-id update-fn & {:keys [label validate? with-libraries?] :or {validate? true} :as opts}]
(when (string? label)
(fsnap/create-file-snapshot! system nil file-id label))
(let [conn (db/get-connection system)
file (get-file system file-id)
libs (when with-libraries?
@ -144,6 +140,9 @@
(when validate?
(cfv/validate-file-schema! file'))
(when (string? label)
(fsnap/create-file-snapshot! system nil file-id label))
(let [file' (update file' :revn inc)]
(update-file! system file')
true))))