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

jscheffl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new a1470a949bc Neutralize path separator in IMAP (#66951)
a1470a949bc is described below

commit a1470a949bc278aafca4212b95069b4b75954015
Author: Jens Scheffler <[email protected]>
AuthorDate: Thu May 14 17:27:18 2026 +0200

    Neutralize path separator in IMAP (#66951)
---
 providers/imap/src/airflow/providers/imap/hooks/imap.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/providers/imap/src/airflow/providers/imap/hooks/imap.py 
b/providers/imap/src/airflow/providers/imap/hooks/imap.py
index b3c9ebf0b9a..ecb99eb2061 100644
--- a/providers/imap/src/airflow/providers/imap/hooks/imap.py
+++ b/providers/imap/src/airflow/providers/imap/hooks/imap.py
@@ -302,13 +302,13 @@ class ImapHook(BaseHook):
         return os.path.islink(name)
 
     def _is_escaping_current_directory(self, name: str) -> bool:
-        return "../" in name
+        return f"..{os.sep}" in name
 
     def _correct_path(self, name: str, local_output_directory: str) -> str:
         return (
             local_output_directory + name
-            if local_output_directory.endswith("/")
-            else local_output_directory + "/" + name
+            if local_output_directory.endswith(os.sep)
+            else local_output_directory + os.sep + name
         )
 
     def _create_file(self, name: str, payload: Any, local_output_directory: 
str) -> None:

Reply via email to