Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/#196 update raw issue #197

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions digipipe/scripts/data_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ def copy_files(src_path: str, dest_path: str) -> None:
for file in os.listdir(src_dir):
src_file = os.path.join(src_dir, file)
dst_file = os.path.join(dst_dir, file)
if not os.path.isfile(dst_file):
files_to_copy.append(file)
if file == ".gitkeep":
continue
else:
if os.path.isfile(dst_file):
if file == ".gitkeep":
continue
print(f"\n'{file}' already exists in '{d}/data'.")
overwrite_file = input("Do you want to update it? (y/n) ")
while overwrite_file.lower() not in ["y", "n"]:
overwrite_file = input(
"Invalid input. Enter 'y' or 'n': "
"""Invalid input. Enter 'y' or 'n': """
)
if overwrite_file.lower() == "y":
shutil.copy(src_file, dst_file)
print(f"'{file}' updated.")
else:
continue
else:
files_to_copy.append(file)

for file in files_to_copy:
src_file = os.path.join(src_dir, file)
Expand Down