Skip to content

Commit

Permalink
bugfix setup rundir when overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
ashjbarnes committed Sep 4, 2024
1 parent 31a6139 commit a21e564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regional_mom6/regional_mom6.py
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ def setup_run_directory(
if not overwrite:
for file in base_run_dir.glob(
"*"
): ## copy each file individually if it doesn't already exist OR overwrite = True
): ## copy each file individually if it doesn't already exist
if not os.path.exists(self.mom_run_dir / file.name):
## Check whether this file exists in an override directory or not
if (
Expand All @@ -1637,7 +1637,7 @@ def setup_run_directory(
else:
shutil.copytree(base_run_dir, self.mom_run_dir, dirs_exist_ok=True)
if overwrite_run_dir != False:
shutil.copy(base_run_dir / file, self.mom_run_dir)
shutil.copytree(base_run_dir, self.mom_run_dir, dirs_exist_ok=True)

## Make symlinks between run and input directories
inputdir_in_rundir = self.mom_run_dir / "inputdir"
Expand Down

0 comments on commit a21e564

Please sign in to comment.