Commit 4b1e98b0 authored by Steve Dower's avatar Steve Dower

Issue #29079: Prevent infinite loop in pathlib.resolve() on Windows

parent 40619399
...@@ -192,7 +192,9 @@ class _WindowsFlavour(_Flavour): ...@@ -192,7 +192,9 @@ class _WindowsFlavour(_Flavour):
s = self._ext_to_normal(_getfinalpathname(s)) s = self._ext_to_normal(_getfinalpathname(s))
except FileNotFoundError: except FileNotFoundError:
previous_s = s previous_s = s
s = os.path.abspath(os.path.join(s, os.pardir)) s = os.path.dirname(s)
if previous_s == s:
return path
else: else:
if previous_s is None: if previous_s is None:
return s return s
......
...@@ -40,6 +40,8 @@ Core and Builtins ...@@ -40,6 +40,8 @@ Core and Builtins
Library Library
------- -------
- Issue #29079: Prevent infinite loop in pathlib.resolve() on Windows
- Issue #13051: Fixed recursion errors in large or resized - Issue #13051: Fixed recursion errors in large or resized
curses.textpad.Textbox. Based on patch by Tycho Andersen. curses.textpad.Textbox. Based on patch by Tycho Andersen.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment