From 34ee836a19c550c1f2b19baa6f4ac3f2a48695d0 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Mon, 1 May 2017 20:48:04 +0200 Subject: github-lambda: do not override index.html if exists --- src/blogc-github-lambda/lambda_function.py.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blogc-github-lambda/lambda_function.py.in b/src/blogc-github-lambda/lambda_function.py.in index cafb7c4..37d3828 100644 --- a/src/blogc-github-lambda/lambda_function.py.in +++ b/src/blogc-github-lambda/lambda_function.py.in @@ -75,7 +75,9 @@ def translate_filename(filename): p = basename.split('.') if len(p) == 2 and p[0] == 'index': f[-1] = 'index.html' - return '/'.join(f) + f = '/'.join(f) + if not os.path.exists(f): + return f return filename -- cgit v1.2.3-18-g5258