Fixed bogus backup when no recursive directories set

This commit is contained in:
deajan 2017-01-02 22:26:00 +01:00
parent eead765d69
commit bc396270df
1 changed files with 63 additions and 59 deletions

View File

@ -7,7 +7,7 @@ PROGRAM="obackup"
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
PROGRAM_VERSION=2.1-dev
PROGRAM_BUILD=2017010205
PROGRAM_BUILD=2017010206
IS_STABLE=no
include #### OFUNCTIONS FULL SUBSET ####
@ -455,8 +455,8 @@ function ListRecursiveBackupDirectories {
local excluded
local fileArray
if [ "$RECURSIVE_DIRECTORY_LIST" == "" ]; then
fi
if [ "$RECURSIVE_DIRECTORY_LIST" != "" ]; then
# 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
@ -502,6 +502,9 @@ function ListRecursiveBackupDirectories {
fi
done < "$output_file"
fi
fi
if [ "$DIRECTORY_LIST" != "" ]; then
IFS=$PATH_SEPARATOR_CHAR read -r -a fileArray <<< "$DIRECTORY_LIST"
for directory in "${fileArray[@]}"; do
@ -519,6 +522,7 @@ function ListRecursiveBackupDirectories {
FILE_BACKUP_TASKS="$FILE_BACKUP_TASKS$PATH_SEPARATOR_CHAR$directory"
fi
done
fi
}
function _GetDirectoriesSizeLocal {