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 <ralf.zerres@networkx.de>
This commit is contained in:
2018-12-21 16:17:12 +01:00
parent 3a6ba6b0af
commit 2ea0c04147

View File

@@ -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