Skip to content

Commit

Permalink
Move call to os.getcwd() back into Path.cwd()
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 24, 2022
1 parent b061747 commit 99eb8b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def cwd(cls):
"""Return a new path pointing to the current working directory
(as returned by os.getcwd()).
"""
return cls().absolute()
return cls(os.getcwd())

@classmethod
def home(cls):
Expand Down Expand Up @@ -768,7 +768,7 @@ def absolute(self):
"""
if self.is_absolute():
return self
return self.makepath(os.getcwd(), self)
return self.makepath(self.cwd(), *self._parts)

def resolve(self, strict=False):
"""
Expand Down

0 comments on commit 99eb8b1

Please sign in to comment.