From eead765d6919de8d517af553e7c0f68658bdd1ac Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 2 Jan 2017 22:23:44 +0100 Subject: [PATCH] Reverted exit code handling --- dev/n_obackup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index 22c6076..a73d135 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -455,12 +455,14 @@ function ListRecursiveBackupDirectories { local excluded local fileArray + if [ "$RECURSIVE_DIRECTORY_LIST" == "" ]; then + fi # Return values from subfunctions can be 0 (no error), 1 (only errors) or 2 (some errors). Do process output except on 1 return code Logger "Listing directories to backup." "NOTICE" if [ "$BACKUP_TYPE" == "local" ] || [ "$BACKUP_TYPE" == "push" ]; then _ListRecursiveBackupDirectoriesLocal & WaitForTaskCompletion $! $SOFT_MAX_EXEC_TIME_FILE_TASK $HARD_MAX_EXEC_TIME_FILE_TASK $SLEEP_TIME $KEEP_LOGGING true true false - if [ $? -ne 0 ]; then + if [ $? -eq 1 ]; then output_file="" else output_file="$RUN_DIR/$PROGRAM._ListRecursiveBackupDirectoriesLocal.$SCRIPT_PID.$TSTAMP" @@ -468,7 +470,7 @@ function ListRecursiveBackupDirectories { elif [ "$BACKUP_TYPE" == "pull" ]; then _ListRecursiveBackupDirectoriesRemote & WaitForTaskCompletion $! $SOFT_MAX_EXEC_TIME_FILE_TASK $HARD_MAX_EXEC_TIME_FILE_TASK $SLEEP_TIME $KEEP_LOGGING true true false - if [ $? -ne 0 ]; then + if [ $? -eq 1 ]; then output_file="" else output_file="$RUN_DIR/$PROGRAM._ListRecursiveBackupDirectoriesRemote.$SCRIPT_PID.$TSTAMP"