fix Trac#25
[matthijs/upstream/backupninja.git] / handlers / maildir.in
index 4b98debfbef9f26acbe82bd14ad1cd3587356b27..7a68e858a5f36fbcf07defab659d430dd8e5dbfe 100644 (file)
@@ -58,14 +58,14 @@ failedcount=0
 destdir=${destdir%/}
 srcdir=${srcdir%/}
 
-# used for testing
-#getconf testuser elijah
-
 [ -d $srcdir ] || fatal "source directory $srcdir doesn't exist"
 
 [ "$multiconnection" == "notset" ] && fatal "The maildir handler uses a very different destination format. See the example .maildir for more information"
 
-[ ! $test ] || testflags="--dry-run -v"
+if [ $test ]; then
+   testflags="--dry-run -v"
+fi
+
 rsyncflags="$testflags -e 'ssh -p $destport' -r -v --ignore-existing --delete --size-only --bwlimit=$speedlimit"
 excludes="--exclude '.Trash/\*' --exclude '.Mistakes/\*' --exclude '.Spam/\*'"