SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 0 Python

bpo-39899: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. (GH-18841)

This makes `ntpath.expanduser()` match `pathlib.Path.expanduser()` in this regard, and is more in line with `posixpath.expanduser()`'s cautious approach.

Also remove the near-duplicate implementation of `expanduser()` in pathlib, and by doing so fix a bug where KeyError could be raised when expanding another user's home directory.
B
Barney Gale committed
3f3d82b84823eb28abeedf317bbe107bbe7f6492
Parent: df5dc1c
Committed by GitHub <noreply@github.com> on 4/7/2021, 10:50:13 PM