This is an automated email from the ASF dual-hosted git repository.

gopidesu pushed a commit to branch fix-paths
in repository https://gitbox.apache.org/repos/asf/airflow-site-archive.git


The following commit(s) were added to refs/heads/fix-paths by this push:
     new bd00a5314a Update local_path format when specific folder provides
bd00a5314a is described below

commit bd00a5314a0b5f2bd62c95aaeed5b747a253f6c3
Author: Pavan Kumar <[email protected]>
AuthorDate: Thu May 1 16:06:46 2025 +0100

    Update local_path format when specific folder provides
---
 scripts/s3_to_github.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/s3_to_github.py b/scripts/s3_to_github.py
index 0e92634842..2b8effcfbc 100644
--- a/scripts/s3_to_github.py
+++ b/scripts/s3_to_github.py
@@ -76,8 +76,9 @@ if __name__ == "__main__":
         if syncer.verify_document_folder(document_folder):
             console.print(f"[blue] Document folder {document_folder} exists in 
bucket {args.bucket_path}.[/]")
             source_prefix = syncer.prefix.rstrip("/") + "/" + document_folder
-            source = 
f"s3://{syncer.bucket_name}/{syncer.prefix}{document_folder}"
-            syncer.sync(source=source, destination=args.local_path)
+            source = f"s3://{syncer.bucket_name}/{source_prefix}"
+            local_path = args.local_path.rstrip("/") + "/" + document_folder
+            syncer.sync(source=source, destination=local_path)
             sys.exit(0)
         else:
             console.print(f"[red] Document folder {document_folder} does not 
exist in bucket {args.bucket_path}.[/]")

Reply via email to