diff --git a/Lib/pathlib.py b/Lib/pathlib.py --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -180,7 +180,7 @@ if not s: return os.getcwd() if _getfinalpathname is not None: - return self._ext_to_normal(_getfinalpathname(s)) + return _getfinalpathname(s) # Means fallback on absolute return None diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -1947,6 +1947,10 @@ p = P(BASE, "dirC") self.assertEqual(set(p.rglob("FILEd")), { P(BASE, "dirC/dirD/fileD") }) + def test_resolve_ext_prefix(self): + P = self.cls + p = P(pathlib._windows_flavour.ext_namespace_prefix, BASE) + self.assertEqual("\\\\?\\" + BASE, str(p.resolve())) if __name__ == "__main__": unittest.main()