diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-05-01 20:48:04 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-05-01 20:48:04 +0200 |
commit | 34ee836a19c550c1f2b19baa6f4ac3f2a48695d0 (patch) | |
tree | 37239a48cd7409df27ec868ddb4f91ac1b1472f7 | |
parent | c071ac260a24561c889643b7f8df37950a597137 (diff) | |
download | blogc-34ee836a19c550c1f2b19baa6f4ac3f2a48695d0.tar.gz blogc-34ee836a19c550c1f2b19baa6f4ac3f2a48695d0.tar.bz2 blogc-34ee836a19c550c1f2b19baa6f4ac3f2a48695d0.zip |
github-lambda: do not override index.html if exists
-rw-r--r-- | src/blogc-github-lambda/lambda_function.py.in | 4 |
1 files changed, 3 insertions, 1 deletions
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 |