From 2ea0c041474f259654e7cee5faafae72ce757b08 Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Fri, 21 Dec 2018 16:17:12 +0100 Subject: [PATCH] dsnap-sync: correct handling of snapper_source_snapshot_size - we need to check the length of the variable, not its existence Signed-off-by: Ralf Zerres --- bin/dsnap-sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dsnap-sync b/bin/dsnap-sync index 17e6c0b..2e688c3 100755 --- a/bin/dsnap-sync +++ b/bin/dsnap-sync @@ -1703,7 +1703,7 @@ run_backup () { || [ "$backup_mode" = "full" ] ; then # send full snapshot to target if [ $verbose -ge 2 ]; then - if [ $snapper_source_snapshot_size -gt 0 ]; then + if [ ${#snapper_source_snapshot_size} -gt 0 ]; then printf "${MAGENTA}Sending ${GREEN}snapshot${NO_COLOR} for snapper config ${GREEN}'%s' ${MAGENTA}(id='%s', size='%s')${NO_COLOR} ...\n" \ "$selected_config" "$snapper_source_id" "$snapper_source_snapshot_size" else