We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 180c62e + 75ddc72 commit c911859Copy full SHA for c911859
job_executor/adapter/local_storage.py
@@ -409,10 +409,12 @@ def archive_input_files(dataset_name: str):
409
Archives the input .tar files if not already archived
410
"""
411
archive_dir = INPUT_DIR / "archive"
412
- tar_file = INPUT_DIR / f"{dataset_name}.tar"
+ tar_filename = f"{dataset_name}.tar"
413
+ archived_tar_file = archive_dir / tar_filename
414
+ tar_file = INPUT_DIR / tar_filename
415
if not archive_dir.exists():
416
os.makedirs(archive_dir, exist_ok=True)
- if tar_file.exists():
417
+ if tar_file.exists() and not os.path.isfile(archived_tar_file):
418
shutil.move(str(tar_file), str(archive_dir))
419
420
0 commit comments