repl-chris commented on code in PR #23535:
URL: https://github.com/apache/airflow/pull/23535#discussion_r877568844


##########
airflow/utils/file.py:
##########
@@ -208,10 +209,11 @@ def _find_path_from_directory(
 
     :return: a generator of file paths which should not be ignored.
     """
+    # A Dict of patterns, keyed using resolved, absolute paths
     patterns_by_dir: Dict[Path, List[_IgnoreRule]] = {}
 
     for root, dirs, files in os.walk(base_dir_path, followlinks=True):
-        patterns: List[_IgnoreRule] = patterns_by_dir.get(Path(root), [])
+        patterns: List[_IgnoreRule] = 
patterns_by_dir.get(Path(root).resolve(), [])

Review Comment:
   This `resolve()` seems bad.  When the `root` (or any parent of `root`) is a 
symlink, this will get the wrong path. I'd expect 
`Path(os.path.normpath(os.path.abspath(root)))` is more what we'd want....



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