Skip to content

Commit 53668eb

Browse files
committed
Fix building from non-working directory (fixes nficano#120)
1 parent 7afe7cf commit 53668eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

aws_lambda/aws_lambda.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,16 +327,17 @@ def build(
327327

328328
files = []
329329
for filename in os.listdir(src):
330-
if os.path.isfile(filename):
330+
abs_filename = os.path.join(src, filename)
331+
if os.path.isfile(abs_filename):
331332
if filename == '.DS_Store':
332333
continue
333334
if filename == config_file:
334335
continue
335336
print('Bundling: %r' % filename)
336-
files.append(os.path.join(src, filename))
337+
files.append(abs_filename)
337338
elif os.path.isdir(filename) and filename in source_directories:
338339
print('Bundling directory: %r' % filename)
339-
files.append(os.path.join(src, filename))
340+
files.append(abs_filename)
340341

341342
# "cd" into `temp_path` directory.
342343
os.chdir(path_to_temp)

0 commit comments

Comments
 (0)