From: Barry Warsaw Date: Wed, 4 Jun 2014 18:11:46 +0000 (-0400) Subject: Don't chmod() if path is a symlink. X-Git-Tag: v3.4.2rc1~443 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=adaddde369872dfbc7fd248794d07614d4395562;p=python Don't chmod() if path is a symlink. --- diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index c258b1c05a..b5ef2d88e9 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -215,7 +215,8 @@ class EnvBuilder: # Issue 18807: make copies if # symlinks are not wanted copier(context.env_exe, path) - os.chmod(path, 0o755) + if not os.path.islink(path): + os.chmod(path, 0o755) else: subdir = 'DLLs' include = self.include_binary