Skip to content

Commit

Permalink
Set slot values of empty paths up front.
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 4, 2023
1 parent 0f4122a commit 8d94ffd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,9 @@ def __init__(self, *args):
if len(paths) == 1:
self._raw_path_cached = paths[0]
elif len(paths) == 0:
self._raw_path_cached = '.'
self._str = self._raw_path_cached = '.'
self._drv = self._root = ''
self._tail_cached = []
self._resolving = False

def __reduce__(self):
Expand Down

0 comments on commit 8d94ffd

Please sign in to comment.