Skip to content

Commit 2db803d

Browse files
committed
Only replace if the file doesn't already exist
1 parent 4f93dc5 commit 2db803d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ramjet/data_interface/tess_data_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,8 @@ def download_spoc_light_curves_for_tic_ids_chunk(
641641
if manifest_row["Status"] == "COMPLETE":
642642
original_file_path = Path(manifest_row["Local Path"])
643643
updated_file_path = download_directory.joinpath(original_file_path.name)
644-
updated_file_path.unlink(missing_ok=True)
645-
original_file_path.rename(updated_file_path)
644+
if not updated_file_path.exists():
645+
original_file_path.rename(updated_file_path)
646646
light_curve_paths.append(updated_file_path)
647647
else:
648648
error_message = (

0 commit comments

Comments
 (0)