mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Issue #444582: shutil.which() respects relative paths.
This commit is contained in:
parent
849349de05
commit
07c24d13ed
3 changed files with 13 additions and 3 deletions
|
@ -1000,7 +1000,7 @@ def which(cmd, mode=os.F_OK | os.X_OK, path=None):
|
|||
|
||||
seen = set()
|
||||
for dir in path:
|
||||
dir = os.path.normcase(os.path.abspath(dir))
|
||||
dir = os.path.normcase(dir)
|
||||
if not dir in seen:
|
||||
seen.add(dir)
|
||||
for thefile in files:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue