dup: use duplicity's --extra-clean option when necessary
[matthijs/upstream/backupninja.git] / handlers / dup.in
index ffae48c1bece695bcd2462f4bcc33e4929d34783..c8dfcba6480340122769725e0d23942f1b4ded04 100644 (file)
@@ -165,6 +165,11 @@ if [ "$incremental" == "no" ]; then
    fi
 fi
 
+### Cleanup options
+if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 1 ]; then
+   execstr_options="${execstr_options} --extra-clean"
+fi
+
 ### Temporary directory
 precmd=
 if [ -n "$tmpdir" ]; then