jingi723 commented on code in PR #74322:
URL: https://github.com/apache/airflow/pull/74322#discussion_r4196633633


##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:
##########
@@ -1823,7 +1823,10 @@ def sync_to_local_dir(self, bucket_name: str, local_dir: 
Path, s3_prefix="", del
             if obj.key.endswith("/"):
                 continue
             obj_path = Path(obj.key)
-            local_target_path = 
local_dir.joinpath(obj_path.relative_to(s3_prefix))
+            relative_path = obj_path.relative_to(s3_prefix)
+            if relative_path == Path("."):

Review Comment:
   Fixed in 4de764e602bd812ce843a909270e649455326557. The check now reuses the 
resolved relative path, with a regression for `dags/../<local_dir.name>`. The 
related S3 suite passes (178 tests), as do the S3Hook tests on Airflow 2.11.0 
(162 tests).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to