From 2ad781ef928b519964048760e0215f6c4e658ac9 Mon Sep 17 00:00:00 2001 From: Barney Gale Date: Mon, 4 Dec 2023 23:04:38 +0000 Subject: [PATCH] Update Lib/pathlib.py Co-authored-by: Alex Waygood --- Lib/pathlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 06f2ca28329be9..8fb7490de619a4 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -1415,10 +1415,10 @@ def absolute(self): """ if self.is_absolute(): return self - elif self.root: + if self.root: drive = os.path.splitroot(os.getcwd())[0] return self._from_parsed_parts(drive, self.root, self._tail) - elif self.drive: + if self.drive: # There is a CWD on each drive-letter drive. cwd = os.path.abspath(self.drive) else: