From 2989beae023eb5959a40b785e75662fe4f8feb19 Mon Sep 17 00:00:00 2001 From: Lisandro Date: Fri, 7 Jun 2019 19:24:59 -0300 Subject: [PATCH] Added followlinks=True when calling listdir In order to solve the issue #2221, I've added followlinks=True when calling listdir() from functions compile_views(), compile_models() and compile_controllers() --- gluon/compileapp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gluon/compileapp.py b/gluon/compileapp.py index cde7ee3b..cbc41518 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -437,7 +437,7 @@ def compile_views(folder, skip_failed_views=False): """ path = pjoin(folder, 'views') failed_views = [] - for fname in listdir(path, REGEX_VIEW_PATH): + for fname in listdir(path, REGEX_VIEW_PATH, followlinks=True): try: data = parse_template(fname, path) except Exception as e: @@ -462,7 +462,7 @@ def compile_models(folder): Compiles all the models in the application specified by `folder` """ path = pjoin(folder, 'models') - for fname in listdir(path, REGEX_MODEL_PATH): + for fname in listdir(path, REGEX_MODEL_PATH, followlinks=True): data = read_file(pjoin(path, fname)) modelfile = 'models.'+fname.replace(os.sep, '.') filename = pjoin(folder, 'compiled', modelfile) @@ -487,7 +487,7 @@ def compile_controllers(folder): Compiles all the controllers in the application specified by `folder` """ path = pjoin(folder, 'controllers') - for fname in listdir(path, REGEX_CONTROLLER): + for fname in listdir(path, REGEX_CONTROLLER, followlinks=True): data = read_file(pjoin(path, fname)) exposed = find_exposed_functions(data) for function in exposed: