From 6b4dcdb5aea0d9fc5aadd12cf2a5bc65ca3cfbe9 Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Wed, 11 Sep 2019 15:58:57 +0200 Subject: [PATCH] Check if item.src is actually filled --- templates/restic_script_Linux.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/restic_script_Linux.j2 b/templates/restic_script_Linux.j2 index 955b363..ac3f655 100644 --- a/templates/restic_script_Linux.j2 +++ b/templates/restic_script_Linux.j2 @@ -37,7 +37,7 @@ set -euxo pipefail Define path #} {% macro path(repo) -%} - {% if repo.src is defined %}{{ repo.src }}{% else %}$HOME/{{ repo.stdin_filename }}{% endif %} + {% if repo.src is defined and repo.src != None and (repo.src|length>0) %}{{ repo.src }}{% else %}{{ repo.stdin_filename }}{% endif %} {%- endmacro %} {# Define retention pattern