Fix bug with downloaded file getting their file path added, fix bug with azure blob path (#3592)

Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
Suchintan
2025-10-02 14:32:41 -04:00
committed by GitHub
parent 91b67f500c
commit 8b0541af9f
2 changed files with 19 additions and 6 deletions

View File

@@ -547,6 +547,7 @@ class ForgeAgent:
final_file_name = f"download-{datetime.now().strftime('%Y%m%d%H%M%S%f')}-{random_file_id}"
# Check if file with this name already exists
final_file_name = final_file_name
target_path = os.path.join(workflow_download_directory, final_file_name + file_extension)
counter = 1
while os.path.exists(target_path):
@@ -555,7 +556,7 @@ class ForgeAgent:
target_path = os.path.join(workflow_download_directory, final_file_name + file_extension)
counter += 1
rename_file(os.path.join(workflow_download_directory, file), target_path)
rename_file(os.path.join(workflow_download_directory, file), final_file_name + file_extension)
LOG.info(
"Task marked as completed due to download",