dabla commented on code in PR #46582:
URL: https://github.com/apache/airflow/pull/46582#discussion_r1976429313
##########
providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -329,16 +351,21 @@ def store_directory(self, remote_full_path: str,
local_full_path: str, confirm:
"""
if self.path_exists(remote_full_path):
raise AirflowException(f"{remote_full_path} already exists")
- self.create_directory(remote_full_path)
- for root, dirs, files in os.walk(local_full_path):
- for dir_name in dirs:
- dir_path = os.path.join(root, dir_name)
- new_remote_path = os.path.join(remote_full_path,
os.path.relpath(dir_path, local_full_path))
- self.create_directory(new_remote_path)
- for file_name in files:
- file_path = os.path.join(root, file_name)
- new_remote_path = os.path.join(remote_full_path,
os.path.relpath(file_path, local_full_path))
- self.store_file(new_remote_path, file_path, confirm)
+ with self.get_conn():
Review Comment:
No worries I forgot to warn you as we had to fix backward compatibility
yesterday, my bad
--
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]