ajinkya-xyz commented on code in PR #25705:
URL: https://github.com/apache/airflow/pull/25705#discussion_r945745538


##########
airflow/providers/sftp/sensors/sftp.py:
##########
@@ -67,7 +68,7 @@ def poke(self, context: 'Context') -> bool:
         if self.file_pattern:
             file_from_pattern = self.hook.get_file_by_pattern(self.path, 
self.file_pattern)
             if file_from_pattern:
-                actual_file_to_check = file_from_pattern
+                actual_file_to_check = os.path.join(self.path, 
file_from_pattern)

Review Comment:
   @uranusjr Makes sense! Update code to use posixpath instead. Thank you!
   
   Reference : 
https://stackoverflow.com/questions/36592213/using-os-path-for-posix-path-operations-on-windows



##########
airflow/providers/sftp/sensors/sftp.py:
##########
@@ -67,7 +68,7 @@ def poke(self, context: 'Context') -> bool:
         if self.file_pattern:
             file_from_pattern = self.hook.get_file_by_pattern(self.path, 
self.file_pattern)
             if file_from_pattern:
-                actual_file_to_check = file_from_pattern
+                actual_file_to_check = os.path.join(self.path, 
file_from_pattern)

Review Comment:
   @uranusjr Makes sense! Updated code to use posixpath instead. Thank you!
   
   Reference : 
https://stackoverflow.com/questions/36592213/using-os-path-for-posix-path-operations-on-windows



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