Merge branch 'patch-1' into 'master'

Fix wrong file permissions in Git hook.

See merge request pycqa/flake8!439
This commit is contained in:
Sam Bull 2020-06-10 10:13:57 +00:00
commit 94a9a05e59

View file

@ -152,6 +152,7 @@ def copy_file_to(destination_directory, filepath, contents):
temporary_filepath = os.path.join(temporary_directory, filename)
with open(temporary_filepath, "wb") as fd:
fd.write(contents)
shutil.copystat(filepath, temporary_filepath)
return temporary_filepath