fix(libtofs): “files_switch” mess up the variable defined by “map.jinja”

- “map.jinja” export a variable name as “<tplroot>”
- import of “libtofs.jinja” is done with context and has access to
  “<tplroot>” variable
- in “files_switch”, appending the empty string to the “fsl” variable
  modify globally “<tplroot>['tofs']['files_switch']”

* TEMPLATE/libtofs.jinja: do not use inplace “append” to avoid side effect.
This commit is contained in:
Daniel Dehennin 2020-02-14 08:57:31 +01:00
parent 8359cc944f
commit ab4ce751a4

View file

@ -82,7 +82,7 @@
) %}
{#- Append an empty value to evaluate as `default` in the loop below #}
{%- if '' not in fsl %}
{%- do fsl.append('') %}
{%- set fsl = fsl + [''] %}
{%- endif %}
{%- for fs in fsl %}
{%- for src_file in src_files %}