From 4899b3af6ea39f9b54717f96eee9bb61d0ccb9fe Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 4 Jan 2024 16:27:08 +0100 Subject: [PATCH] :bug: Fix incorrect pointer deref on validating file on update operation --- backend/src/app/rpc/commands/files_update.clj | 2 +- backend/src/app/srepl/helpers.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/app/rpc/commands/files_update.clj b/backend/src/app/rpc/commands/files_update.clj index 96b92c0d6..03e1b04da 100644 --- a/backend/src/app/rpc/commands/files_update.clj +++ b/backend/src/app/rpc/commands/files_update.clj @@ -306,7 +306,7 @@ (binding [pmap/*load-fn* (partial feat.fdata/load-pointer cfg id) pmap/*tracked* nil] (-> (files/get-file cfg id :migrate? false) - (feat.fdata/process-pointers deref) ; ensure all pointers resolved + (update :data feat.fdata/process-pointers deref) ; ensure all pointers resolved (fmg/migrate-file)))))) (d/index-by :id))) diff --git a/backend/src/app/srepl/helpers.clj b/backend/src/app/srepl/helpers.clj index bc8caf6c1..c135d3e76 100644 --- a/backend/src/app/srepl/helpers.clj +++ b/backend/src/app/srepl/helpers.clj @@ -83,7 +83,7 @@ (into [file] (map (fn [{:keys [id]}] (binding [pmap/*load-fn* (partial feat.fdata/load-pointer system id)] (-> (files/get-file system id :migrate? false) - (feat.fdata/process-pointers deref) + (update :data feat.fdata/process-pointers deref) (pmg/migrate-file)))))) (d/index-by :id))] (validate/validate-file file libs)))))) @@ -101,7 +101,7 @@ (into [file] (map (fn [{:keys [id]}] (binding [pmap/*load-fn* (partial feat.fdata/load-pointer system id)] (-> (files/get-file system id :migrate? false) - (feat.fdata/process-pointers deref) + (update :data feat.fdata/process-pointers deref) (pmg/migrate-file)))))) (d/index-by :id)) errors (validate/validate-file file libs)