Skip to content

Commit aca240b

Browse files
authored
Copy stat of the files into the zip files
Copy the permissions and stats to the zip files so that executable binary files remain executable.
1 parent 7afe7cf commit aca240b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aws_lambda/aws_lambda.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from imp import load_source
1212
from shutil import copy
1313
from shutil import copyfile
14+
from shutil import copystat
1415
from shutil import copytree
1516
from tempfile import mkdtemp
1617

@@ -346,6 +347,7 @@ def build(
346347

347348
# Copy handler file into root of the packages folder.
348349
copyfile(f, os.path.join(path_to_temp, filename))
350+
copystat(f, os.path.join(path_to_temp, filename))
349351
elif os.path.isdir(f):
350352
destination_folder = os.path.join(path_to_temp, f[len(src) + 1:])
351353
copytree(f, destination_folder)

0 commit comments

Comments
 (0)