From 99eb8b1012a2b5100e8f4a61d3f365c63c376639 Mon Sep 17 00:00:00 2001 From: Barney Gale Date: Sat, 24 Dec 2022 17:56:18 +0000 Subject: [PATCH] Move call to `os.getcwd()` back into `Path.cwd()` --- Lib/pathlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/pathlib.py b/Lib/pathlib.py index e04dd1e63ac655..06b5c77234c37e 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -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): @@ -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): """