remem9527 commented on code in PR #24451:
URL: https://github.com/apache/airflow/pull/24451#discussion_r897338441


##########
airflow/providers/sftp/sensors/sftp.py:
##########
@@ -71,6 +71,8 @@ def poke(self, context: 'Context') -> bool:
                 self.actual_file_to_check = file_from_pattern
             else:
                 return False
+        else:
+            self.actual_file_to_check = self.path

Review Comment:
   Maybe we want to access one of the filenames that matches 
`self.file_pattern`, when `self.file_pattern` is not empty? I am not sure about 
that. We probably need some input from the committer of file_pattern supporting.
   My true opinion is that the implementation about file_pattern is not very 
elegant. The variable `self.path` means a **file** path when 
`self.file_pattern` is empty. But when `self.file_pattern` is specified, the 
variable `self.path` is treated as a **folder** path. 



-- 
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