From f2bc6d60aaf062b9aec41399900e2841b46e4404 Mon Sep 17 00:00:00 2001
From: Hugh Nowlan <nosmo@nosmo.me>
Date: Mon, 30 Apr 2018 12:59:21 +0100
Subject: [PATCH] Error out if archive dir doesn't exist

---
 handlers/dup.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/handlers/dup.in b/handlers/dup.in
index d7ad27b..f31b1d3 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -225,6 +225,7 @@ fi
 # duplicity now enables the archive_dir by default, let's put it into /var/cache/backupninja/duplicity
 # unless the user has specified it.
 if echo "${options}" | grep -qv -- "--archive-dir" ; then
+   [ -d "/var/cache/backupninja/duplicity" ] || fatal "/var/cache/backupninja/duplicity does not exist - create it"
    execstr_options="${execstr_options} --archive-dir /var/cache/backupninja/duplicity"
 fi
 
-- 
GitLab