]> gitweb.fluxo.info Git - backupninja.git/commitdiff
duplicity: for local backups, check that the destination directory exists.
authorintrigeri <intrigeri@boum.org>
Wed, 19 Sep 2012 22:10:10 +0000 (00:10 +0200)
committerintrigeri <intrigeri@boum.org>
Wed, 19 Sep 2012 22:13:18 +0000 (00:13 +0200)
Thanks to ulrich for the preliminary patch.

Closes Redmine#4049.

AUTHORS
ChangeLog
handlers/dup.in

diff --git a/AUTHORS b/AUTHORS
index 7721b0bef7f92ec439f0d57802d175366636207b..a04c51521ad57937944dc550c0a91db6ba8cb0ab 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -45,3 +45,4 @@ Yuval Kogman <nothingmuch@woobling.org> -- RackSpace's CloudFiles support for du
 exobuzz - mysql bugfixes
 Glennie Vignarajah <glennie@glennie.fr> -- mysql bugfix
 ddpaul <paul@reic.ru> -- rsync bugfix
+ulrich -- duplicity bugfix preliminary patch
index 141b8be29d01574efa697030240eb4376236eeaa..9e73d19c97f7d646efa04769f4d58807cad8d204 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+version 1.1  -- UNRELEASED
+    handler changes
+       dup:
+        . For local backups, check that the destination directory exists.
+          Thanks to ulrich for the preliminary patch. (Redmine#4049)
+
 version 1.0.1 -- June 29, 2012
     handler changes
        rsync:
index 9eb2fbb3037cef68cd1a944bb2dd9f5610610543..36db959e304d3761e3a305759beea0d75d427231 100644 (file)
@@ -55,6 +55,13 @@ fi
 if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "ftp" ]; then
    [ -n "$ftp_password" ]  || fatal "ftp_password must be set for FTP backups."
 fi
+if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "file" ]; then
+   if [ ! -e "`echo $desturl | @AWK@ -F '://' '{print $2}'`" ]; then
+      fatal "The destination directory ($desturl) does not exist."
+   elif [ ! -d "`echo $desturl | @AWK@ -F '://' '{print $2}'`" ]; then
+      fatal "The destination ($desturl) is not a directory."
+   fi
+fi
 
 ### VServers
 # If vservers are configured, check that the ones listed in $vsnames do exist.