From 38d6611657be2eb768d1e557c77cbeb0c103d168 Mon Sep 17 00:00:00 2001 From: Kevin Schenk Date: Sun, 22 Dec 2024 13:07:22 -0500 Subject: [PATCH] Update snowfakery.py to fix #3859 --- cumulusci/tasks/bulkdata/snowfakery.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cumulusci/tasks/bulkdata/snowfakery.py b/cumulusci/tasks/bulkdata/snowfakery.py index 1125714ca0..c0ca41eaa3 100644 --- a/cumulusci/tasks/bulkdata/snowfakery.py +++ b/cumulusci/tasks/bulkdata/snowfakery.py @@ -1,3 +1,4 @@ +import os import shutil import time import typing as T @@ -583,8 +584,10 @@ def _generate_and_load_initial_batch(self, working_directory: Path): self.sets_finished_while_generating_template = num_records new_template_dir = data_loader_new_directory_name(template_dir, self.run_until) - shutil.move(template_dir, new_template_dir) - template_dir = new_template_dir + # don't rename path if new_template_dir matches template_dir + if os.path.abspath(template_dir) != os.path.abspath(new_template_dir): + shutil.move(template_dir, new_template_dir) + template_dir = new_template_dir # don't send data tables to child processes. All they # care about are ID->OID mappings