Skip to content

Commit 6fa2e07

Browse files
author
mergen
committed
update windows default PATHEXT
1 parent 4898415 commit 6fa2e07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/shutil.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
_HAS_FCOPYFILE = posix and hasattr(posix, "_fcopyfile") # macOS
5151

5252
# CMD defaults in Windows 10
53-
_WIN_DEFAULT_PATHEXT = ".COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC"
53+
_WIN_DEFAULT_PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
54+
# PowerShell adds an additional .CPL at the end, which correspond to control panel files
55+
# _WIN_DEFAULT_PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL'
5456

5557
__all__ = ["copyfileobj", "copyfile", "copymode", "copystat", "copy", "copy2",
5658
"copytree", "move", "rmtree", "Error", "SpecialFileError",

0 commit comments

Comments
 (0)