From 9769e0c5369b8d4dbb64ba8b79aaf4404e8af780 Mon Sep 17 00:00:00 2001 From: Naveen M K Date: Tue, 20 Jun 2023 23:00:43 +0530 Subject: [PATCH] Always normalize path in abspath --- Lib/ntpath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 0446301c4e3cf2..0bc5956b52bf40 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -582,7 +582,7 @@ def _abspath_fallback(path): def abspath(path): """Return the absolute version of a path.""" try: - return _getfullpathname(normpath(path)) + return normpath(_getfullpathname(normpath(path))) except (OSError, ValueError): return _abspath_fallback(path)