Skip to content

Commit 1d90c46

Browse files
schenkkpjstvzvsbharath
authored
fix: Prevent 'directory not empty' error in snowfakery on Linux (#3864)
Implemented potential fix to address Linux issue on #3859. Please advise if any changes are requested. --------- Co-authored-by: James Estevez <jestevez@salesforce.com> Co-authored-by: James Estevez <j@jstvz.dev> Co-authored-by: Bharath Chadarajupalli <vchadarajupalli@salesforce.com>
1 parent 53f807b commit 1d90c46

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cumulusci/tasks/bulkdata/snowfakery.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,10 @@ def _generate_and_load_initial_batch(self, working_directory: Path):
583583
self.sets_finished_while_generating_template = num_records
584584

585585
new_template_dir = data_loader_new_directory_name(template_dir, self.run_until)
586-
shutil.move(template_dir, new_template_dir)
587-
template_dir = new_template_dir
586+
# rename only if new_template_dir does not match template_dir
587+
if template_dir.resolve() != new_template_dir.resolve():
588+
shutil.move(template_dir, new_template_dir)
589+
template_dir = new_template_dir
588590

589591
# don't send data tables to child processes. All they
590592
# care about are ID->OID mappings

0 commit comments

Comments
 (0)