Skip to content

Commit

Permalink
Update files/files.py
Browse files Browse the repository at this point in the history
Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
  • Loading branch information
ypriverol and qodo-merge-pro[bot] authored Sep 25, 2024
1 parent e55caf3 commit 6a7bd92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion files/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def download_files_from_ftp(file_list_json, output_folder):
def get_output_file_name(download_url, file, output_folder):
public_filepath_part = download_url.rsplit('/', 1)
logging.debug(file['accession'] + " -> " + public_filepath_part[1])
new_file_path = os.path.join(output_folder, file['accession'] + "-" + public_filepath_part[1])
import uuid
unique_id = str(uuid.uuid4())[:8]
new_file_path = os.path.join(output_folder, f"{file['accession']}-{unique_id}-{public_filepath_part[1]}")
return new_file_path

@staticmethod
Expand Down

0 comments on commit 6a7bd92

Please sign in to comment.