Also don't include hidden files in other templates

This commit is contained in:
Gina Häußge 2015-11-19 19:03:04 +01:00
parent 83f66e133e
commit 9a7bddd530

View file

@ -649,7 +649,9 @@ class Server():
# configure additional template folders for jinja2
import jinja2
filesystem_loader = jinja2.FileSystemLoader([])
import octoprint.util.jinja
filesystem_loader = octoprint.util.jinja.FilteredFileSystemLoader([],
path_filter=lambda x: not octoprint.util.is_hidden_path(x))
filesystem_loader.searchpath = self._template_searchpaths
jinja_loader = jinja2.ChoiceLoader([