[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2021-03-15 Thread Eryk Sun
Eryk Sun added the comment: bpo-38671 has PR 17716 pending approval, which addresses the problem in msg309102 by ensuring that a non-strict resolve begins by getting the absolute path via nt._getfullpathname(). -- resolution: -> duplicate stage: needs patch -> resolved status: open

[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2017-12-29 Thread Eryk Sun
Eryk Sun added the comment: resolve() has additional problems, which possibly could be addressed all at once because it's a small method and the problems are closely related. For an empty path it returns os.getcwd(). I don't think this case is possible in the normal way a

[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2017-12-29 Thread Eryk Sun
Eryk Sun added the comment: If none of the components of a relative path exist, then splitting off the head returns an empty string in the second-to-last pass through the while loop. In the last pass, _getfinalpathname("") raises FileNotFoundError, and ultimately resolve()

[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2017-12-27 Thread Martin Liska
New submission from Martin Liska : The documentation for pathlib.Path.resolve says: "Make the path absolute, resolving any symlinks." On Windows, the behavior doesn't always match the first part of the statement. Example: On a system with an existing, but empty directory